Before that, the 'references' and 'natives' or the outer gexp in an
expression like #~#+#~#$coreutils would include those of the inner
gexp.
* guix/gexp.scm (gexp)[collect-escapes]: Ignore everything below
'ungexp-native' or 'ungexp-native-splicing'.
[collect-native-escapes]: Ignore everything below 'ungexp' or
'ungexp-splicing'.
Fixes build issues whereby #:inputs would be #f. See
<http://hydra.gnu.org/build/320333/nixlog/4/tail-reload>.
* guix/packages.scm (patch-and-repack): #:input defaults to #f.
[lookup-input]: When INPUTS is #f, use (%standard-patch-inputs).
* gnu/packages/commencement.scm (glibc-utf8-locales-final): Make public.
* guix/packages.scm (%standard-patch-inputs): Use
GLIBC-UTF8-LOCALES-FINAL instead of GLIBC-UTF8-LOCALES.
Before that it would sort them by name only, so the order in which two
packages with the same name but a different version would appear was
non-deterministic.
Reported by Tomáš Čech <sleep_walker@gnu.org>.
* guix/scripts/package.scm (find-packages-by-description)[version<?]:
New variable.
Change the 2nd argument to 'sort' to use 'string-compare' and resort
to 'version<?' when P1 and P2 have the same name.
Before that, 'guix package -s foobarbaz' would display only one package
when several match but they have the same location (which is common when
using 'inherit'.)
The original rationale was given at
<http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00280.html> but
it was arguably misguided because it led to "real" packages being
hidden.
Reported by Tomáš Čech <sleep_walker@gnu.org>.
* guix/scripts/package.scm (find-packages-by-description)[same-location?]:
Remove.
Remove call to 'delete-duplicates'.
* guix/packages.scm (patch-and-repack): Remove 'store' parameter and
change default value of #:inputs to (%standard-patch-inputs).
[lookup-input, instantiate-patch]: New procedures.
[patch-inputs]: Remove.
[builder]: Rename to...
[build]: ... this. Use gexps instead of sexps.
(patch-and-repack*): Remove.
(origin->derivation): Use 'patch-and-repack' instead of
'patch-and-repack*'.
* tests/packages.scm ("package-source-derivation,
snippet")[source](snippet): Remove references to '%build-inputs' and
'%outputs'.
* guix/store.scm (set-build-options): Rename #:binary-caches to
#:substitute-urls. Actually pass it in 'pairs' under the
"substitute-urls" key.
* guix/scripts/substitute-binary.scm (%cache-url): Add comment for
"untrusted-substitute-urls".
From now own, (guix packages) depends on (guix gexps); it was the other
way around now. This means that (guix packages) code can use gexps.
* guix/gexp.scm (origin-compiler, package-compiler): Remove.
(default-guile-derivation): New procedure.
(gexp->derivation): Use it instead of 'default-guile' +
'package->derivation'.
* guix/packages.scm (default-guile-derivation): New procedure.
(package-compiler, origin-compiler): New variables.
* doc/guix.texi (G-Expressions): Mention extensibility.
* guix/gexp.scm (<gexp-compiler>): New record type.
(%gexp-compilers): New variable.
(register-compiler!, lookup-compiler): New procedures.
(define-gexp-compiler): New macro.
(origin-compiler, package-compiler): New compilers.
(lower-inputs): Remove clauses for 'origin?' and 'package?'. Add
clause with 'lookup-compiler' instead.
(lower-references): Likewise.
(gexp-inputs)[add-reference-inputs]: Likewise.
(gexp->sexp)[reference->sexp]: Likewise.
* guix/gexp.scm (gexp-inputs)[add-reference-inputs]: Remove clause for
inputs of the form (PACKAGE OUTPUT).
(gexp->sexp)[reference->sexp]: Likewise.
* tests/gexp.scm ("input list splicing"): Change 'list' to 'gexp-input'
for glibc:debug.
("text-file*"): Likewise for %bootstrap-guile:out.
("input list splicing + gexp-input + ungexp-native-splicing"): Remove,
now redundant.
* guix/profiles.scm (package->manifest-entry): Use 'gexp-input' instead
of two-element lists to denote specific package outputs.
(manifest-inputs): Likewise.
(profile-derivation)[info-dir]: Likewise.
* guix/gexp.scm (<gexp-input>)[gexp-input]: Rename to...
[%gexp-input]: ... this. Adjust callers accordingly.
(gexp-input): New procedure.
(gexp-inputs)[add-reference-inputs]: When the input is a list, check
whether each item is already 'gexp-input?' and to not rewrap those.
(gexp-outputs)[add-reference-output]: Likewise.
(gexp->sexp): Likewise.
* tests/gexp.scm ("input list splicing + gexp-input +
ungexp-native-splicing"): New test.
* guix/gexp.scm (<gexp-input>): New record type.
(gexp-inputs)[add-reference-inputs]: Adjust clauses to expect
<gexp-input> objects.
(gexp-outputs)[add-reference-output]: Likewise.
(gexp->sexp)[reference->sexp]: Likewise.
(canonicalize-reference): Remove.
(gexp)[escape->ref]: Use 'gexp-input' for all the references.
Remove use of 'canonicalize-reference'.
CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH from the cmake build system.
* gnu/packages/cmake.scm (cmake)[native-search-paths]: New field.
* guix/build/cmake-build-system.scm (configure): Drop environment variables
CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH.
This fixes a bug whereby uses of 'package-with-python2' at the top-level
in modules other than (gnu packages python) could lead to an "Unbound
variable: python2" error due to the circular references.
Reported by Tomáš Čech.
* guix/build-system/python.scm (package-with-explicit-python)[arguments]:
Check whether PYTHON is a promise, and force it if it is.
(package-with-python2): Wrap 'default-python2' call in 'delay'.
* guix/serialization.scm (read-maybe-utf8-string): New procedure.
* guix/store.scm (process-stderr): Use it for the build log and errors.
* tests/store.scm ("current-build-output-port, UTF-8",
"current-build-output-port, UTF-8 + garbage"): New tests.
This fixes a regression introduced in commit 536c3ee.
* guix/profiles.scm (ca-certificate-bundle): When MANIFEST is empty,
make a trivial derivation.
* guix/scripts/package.scm (guix-package)[process-actions]: Pass
#:ca-certificate-bundle? to 'profile-generation'.
* tests/packages.scm ("--search-paths with pattern"): Likewise.
* tests/profiles.scm ("profile-derivation"): Likewise.
* guix/profiles.scm (ca-certificate-bundle): New procedure.
(profile-derivation): Add 'ca-certificate-bundle?' keyword argument. If
true (the default), add the result of 'ca-certificate-bundle' to 'inputs'.
Co-Authored-By: Ludovic Courtès <ludo@gnu.org>
* guix/build/gnu-build-system.scm (gnu-build): Leave
%DEFAULT-PORT-CONVERSION-STRATEGY unchanged when 'string->bytevector'
fails to convert to ISO-8859-1. This is an attempt to work around the
build failures at <http://hydra.gnu.org/build/263002>.
Suggested by Mark H Weaver.
* guix/build/gnu-build-system.scm (gnu-build): Set
%DEFAULT-PORT-CONVERSION-STRATEGY to 'error.
* guix/packages.scm (patch-and-repack)[builder]: Likewise.
* guix/build/utils.scm (get-char*): New procedure.
(patch-shebang): Use it instead of 'read-char'.
(fold-port-matches): Remove local 'get-char' and use 'get-char*'
instead.
Suggested by Mark H Weaver.
* guix/build/utils.scm (locale-category->string): New procedure.
* guix/build/gnu-build-system.scm (install-locale): Add 'setenv' call.
* guix/packages.scm (%standard-patch-inputs): Add "locales".
(patch-and-repack)[builder]: Add 'locales' variable. When it is true,
call 'setenv' and 'setlocale'.
* guix/build/gnu-build-system.scm (install-locale): New procedure.
(%standard-phases): Add it.
* guix/build-system/gnu.scm (gnu-build): Add #:locale and pass it to
the build script.
(gnu-cross-build): Likewise.
Fixes <http://bugs.gnu.org/19866>.
Reported by Andreas Enge <andreas@enge.fr>.
* guix/build/gnu-build-system.scm (unpack): Use 'unzip' when SOURCE ends
in '.zip'.
Reported by Alex Kost <alezost@gmail.com>
at <http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00702.html>.
* guix/ui.scm (parse-command-line)[parse-options-from]: Add 'seeds'
parameter.
Thread the result of the first 'parse-options-from' call to the
second.
* guix/build/download.scm: Do not attempt to support relative URIs in
"Location" headers if 'declare-relative-uri-header!' is not present.
This is the case for Guile 2.0.6 or earlier.
Reported by Daniel Kochmański <dkochmanski@hellsgate.pl>.
Fixes <http://bugs.gnu.org/19888>.
* guix/tests.scm (shebang-too-long?): New procedure.
* tests/builders.scm ("gnu-build"): Conditionalize on
not (shebang-too-long?).
* tests/packages.scm ("GNU Make, bootstrap"): Likewise.
* tests/guix-package.sh (shebang_not_too_long): New function.
Use it to determine whether to build 'gnu-make-boot0'.
* guix/tests.scm (network-reachable?): New procedure.
* tests/builders.scm (network-reachable?): Remove.
Replace references to it with calls to the new 'network-reachable?'
procedure.
* tests/derivations.scm (%coreutils): Use 'network-reachable?' instead
of 'getaddrinfo'.
* tests/packages.scm: Likewise.
* tests/union.scm: Likewise.
Fixes compilation failures in 'guix pull'.
* guix/import/cpan.scm (%corelist): Change it to a promise by wrapping it with
'delay'.
(cpan-module->sexp): Adapt uses of %corelist by wrapping with 'force'.
Fixes <http://bugs.gnu.org/19840>.
Reported by Ricardo Wurmus <rekado@elephly.net>.
* guix/build/download.scm: On Guile 2.0.11 or earlier, redefine the http
"Location" header to accept relative URIs.
(resolve-uri-reference): New exported procedure.
(http-fetch): Use 'resolve-uri-reference' to resolve redirections.
* guix/http-client.scm (http-fetch): Use 'resolve-uri-reference'
* guix/build/utils.scm (wrap-program): Preserve symbolic links instead of
copying the contents of the link.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Closes <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19743>.
* guix/build/utils.scm (wrap-program): Create scripts that use $0 (which is
usually just the base name) instead of the absolute path to the original
program. Alternative implementation of 2ed11b3.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Closes <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19742>.
* guix/store.scm (text-file): Add optional 'references' parameter. Pass
it to 'add-text-to-store'.
* doc/guix.texi (The Store Monad): Adjust accordingly.
Reported by Andreas Enge <andreas@enge.fr>
at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19764#19>.
* guix/profiles.scm (manifest-transaction-effects): Use 'version>=?'
instead of 'version>?'.
* tests/profiles.scm ("manifest-transaction-effects and
pseudo-upgrades"): New test.
Fixes <http://bugs.gnu.org/19756>.
Reported by <sleep_walker@suse.cz>.
* guix/serialization.scm (currently-restored-file): New variable.
(get-bytevector-n*): New procedure.
(read-int, read-long-long, read-string, read-latin1-string,
read-contents): Use it instead of 'get-bytevector-n'.
(restore-file): Parameterize 'currently-restored-file' and set it.
* tests/nar.scm ("restore-file with incomplete input"): New test.
Before that, any profile generation built when '-p' is used would
effectively become a permanent GC root because the symlink in
/var/guix/gcroots/auto would point directly to /gnu/store/...-profile.
* guix/scripts/package.scm (maybe-register-gc-root): Rename to...
(register-gc-root): ... this. Remove conditional, and replace call to
'canonicalize-path' with (string-append (getcwd) "/" ...).
(guix-package): Call 'register-gc-root' only if PROFILE is different
from %CURRENT-PROFILE.
* tests/guix-package.sh: Add test case.
Before that, if two users on the same machine ran 'guix pull', the
second one would have the "Guix already up to date" message and their
~/.config/guix/latest link would be left unchanged---effectively
preventing them from updating.
* guix/scripts/pull.scm (build-and-install): Install the 'latest'
symlink regardless of whether TO-DO? is true or false.
Suggested by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.
* guix/scripts/offload.scm (register-gc-root)[script]: Replace
'false-if-exception' with a finer-grain 'system-error handler.
Provide the name of MACHINE in 'leave' error message.
Suggested by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.
* guix/scripts/offload.scm (remote-pipe): Remove unneeded 'catch'.
(machine-load): Check the exit value upon (close-pipe pipe). Call
'warning' when it is non-zero.
* guix/scripts/environment.scm (for-each-search-path): Iterate over all
derivation output paths.
(packages->transitive-inputs): Process inputs that specify an output, too.
* guix/store.scm (operation-id): Rename 'build-derivations' to
'build-things', as per Nix commit 1aba0bf0.
(build-derivations): Rename to...
(build-things): ... this. Keep 'build-derivations' as an alias.
(build): New procedure.
* tests/store.scm ("build-things with output path",
"substitute + build-things with output path"): New tests.
* guix/tests.scm (%substitute-directory): New variable.
(call-with-derivation-narinfo): Use it.
(call-with-derivation-substitute): New procedure.
(with-derivation-substitute): New macro.
* tests/store.scm ("substitute"): Use 'with-derivation-substitute'.
("substitute, corrupt output hash"): Likewise.
* guix/tests.scm (derivation-narinfo): Turn 'nar' into a keyword
parameter. Add #:sha256 parameter, and honor it.
(call-with-derivation-narinfo): Add #:sha256 and pass it to
'derivation-narinfo'.
(with-derivation-narinfo): Extend with support for (sha256 => value).
* tests/store.scm ("substitute query"): Use 'with-derivation-narinfo'.
("substitute"): Likewise.
("substitute, corrupt output hash"): Likewise.
("substitute --fallback"): Likewise.
* tests/derivations.scm: Remove Emacs local variable.
* guix/scripts/lint.scm (%options) <--checkers>: Remove 'arg-handler'
parameter, and return a single value.
(guix-lint)[parse-options]: Remove 'arg-handler' parameter from
handlers. Remove second seed to 'args-fold*'.
* tests/guix-lint.sh: Add test.
Fixes <http://bugs.gnu.org/19677>.
Reported by Mark H Weaver <mhw@netris.org>.
* guix/hash.scm: Use (guix gcrypt).
(sha256, open-sha256-md, md-write, md-close): Use 'libgcrypt-func'
instead of 'dynamic-func'.
Before that it would check all the URIs of each package.
* guix/scripts/lint.scm (validate-uri): Really return #f on failure and
#t otherwise.
(check-source): Replace 'for-each' with 'any'.
Fixes <http://bugs.gnu.org/19630>.
Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.
* guix/derivations.scm (&derivation-error,
&derivation-missing-output-error): New error conditions.
(derivation->output-path): Raise a '&derivation-missing-output-error'
if OUTPUT is not an output of DRV.
* guix/ui.scm (call-with-error-handling): Add case for
'derivation-missing-output-error?'.
(show-what-to-build): Check whether (derivation-outputs drv) is
empty.
* tests/packages.scm ("reference to non-existent output"): Add test.
* guix/ui.scm (report-error): Export.
* guix/scripts/system.scm (read-operating-system): Report syntax errors
using standard GNU format. Report other errors using 'display-error'.
Reported by Andreas Enge <andreas@enge.fr>.
* guix/scripts/package.scm (with-null-error-port): New macro.
(search-path-environment-variables): Wrap 'search-path-as-list' call
in 'with-null-error-port'.
* guix/records.scm (define-record-type*)[make-syntactic-constructor]:
Turn THUNKED and DEFAULTS into keyword arguments.
Adjust caller accordingly. Declare 'thunked' and 'defaults' local
variables.
Fixes <http://bugs.gnu.org/19610>.
Reported by Mark H Weaver <mhw@netris.org>.
* guix/nar.scm (restore-one-item): Use 'read-latin1-string' to read the
signature.
* guix/serialization.scm (read-latin1-string): Use 'get-bytevector-n'
instead of 'get-string-n'. Use 'list->string' etc. to convert the
bytevector to a string.
* doc/guix.texi (The Store Monad): Document '%state-monad' and related
procedures. Describe '%store-monad' as an alias for '%state-monad'.
* guix/monads.scm: Update commentary.
* guix/store.scm (define-alias): New macro.
(%store-monad, store-return, store-bind): Define as aliases of the
corresponding %STATE-MONAD part.
(store-lift, text-file, interned-file): Return STORE as a second
value.
(run-with-store): Use 'run-with-state'.
* guix/packages.scm (set-guile-for-build, package-file): Return STORE as
a second value.
* guix/monads.scm: Remove part of the module commentary.
* guix/packages.scm (origin->derivation): Take body from
'package-source-derivation', and change it to monadic style. Expect
METHOD to a monadic procedure.
(package-source-derivation): Define in terms of 'origin->derivation'.
* guix/download.scm (url-fetch): Remove 'store' argument. Remove
'guile-for-build' variable. Turn into a monadic procedure.
* guix/git-download.scm (git-fetch): Likewise.
* guix/svn-download.scm (svn-fetch): Likewise.
* tests/builders.scm (url-fetch*): New procedure.
Change tests to call 'url-fetch*' instead of 'url-fetch'.
* tests/packages.scm ("package-source-derivation, snippet"): Remove
'store' parameter of 'fetch' and change it to use 'interned-file'
instead of 'add-to-store'.
* gnu/packages/bootstrap.scm (bootstrap-origin)[boot]: Remove 'store'
parameter.
Reported by Mark H Weaver <mhw@netris.org>
* guix/build/glib-or-gtk-build-system.scm (generate-icon-cache): Add check for
existence of icons directory.
* guix/build/glib-or-gtk-build-system.scm (data-directories): Rename
'schemas-directories' to 'data-directories' and add support for XDG theming
data.
* guix/build/glib-or-gtk-build-system.scm (gio-module-directories): New
function.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Update names to
reflect that we are dealing with more types of data and not only with
schemas. Add handling of GIO modules.
* guix/build-system/glib-or-gtk.scm (lower): Import the 'bin' output of GLib
instead of 'out'. This was an error since we need the program
'glib-compile-schemas'. Update the description.
This yields a 46% improvement in 'derivation-prerequisites' invocations
on the Emacs derivation.
* guix/derivations.scm (derivation-prerequisites): Add 'input-set'
variable, and use it in iterations.
This makes 'guix environment PACKAGE' significantly faster when
substitutes are enabled. Before that, it would lead to many invocations
of 'guix substitute-binary', one per 'derivation-prerequisites-to-build'
call. Now, all these are replaced by a single invocation.
* guix/derivations.scm (derivation-output-paths, substitution-oracle):
New procedures.
(derivation-prerequisites-to-build): Replace #:use-substitutes? with
#:substitutable?. Remove the local 'derivation-output-paths' and
'substitutable?'.
* guix/ui.scm (show-what-to-build): Add 'substitutable?'. Pass it to
'derivation-prerequisites-to-build'.
[built-or-substitutable?]: Use it instead of 'has-substitutes?'.
* tests/derivations.scm ("derivation-prerequisites-to-build and
substitutes"): Use #:substitutable? instead of #:use-substitutes?.
* guix/derivations.scm (derivation-output-names): New procedure.
(derivation-prerequisites-to-build): Use it for #:outputs.
(map-derivation): Likewise.
* tests/derivations.scm ("derivation-output-names"): New test.
* guix/build/utils.scm (patch-/usr/bin/file): New procedure.
* guix/build/gnu-build-system.scm (patch-usr-bin-file): Rewrite using
it. Patch all the files returned by 'find-files' that are executable.
* gnu/packages/gawk.scm (gawk)[arguments]: Remove use of 'substitute*'
for 'extension/configure'.
* guix/scripts/substitute-binary.scm (narinfo-signature->canonical-sexp):
Change "~a" to "~s" in error message.
(%signature-line-rx): Remove.
(narinfo-sha256): Use 'string-contains' instead of 'regexp-exec', and
'string-take' instead of 'match:substring'.
* guix/records.scm (%recutils-field-rx, %recutils-comment-rx,
%recutils-plus-rx): Remove.
(%recutils-field-charset): New variable.
(recutils->alist): Adjust to use tests (string-ref line 0) instead of
regexps.
Based on preliminary work by John Darrington <john@darrington.wattle.id.au>.
* gnu/packages/cross-base.scm (xgcc-armhf): New variable.
* gnu/packages/gcc.scm (gcc-configure-flags-for-triplet): Add armhf case.
(gcc-4.7)[pre-configure]: Add gcc/config/*/linux-eabi.h to the list
of files in which to patch GLIBC_DYNAMIC_LINKER.
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add armhf case.
* guix/utils.scm (gnu-triplet->nix-system, nix-system->gnu-triplet):
Add armhf cases.
Fixes <http://bugs.gnu.org/18895>.
* guix/build/gnu-build-system.scm (patch-shebangs): Add #:inputs
parameter. Remove 'bindirs'. Add 'bin-directories',
'output-bindirs', and 'input-bindirs'. Use them instead of (getenv
"PATH") to as the argument to 'patch-shebang'.
* guix/scripts/package.scm (search-path-environment-variables): Add
local 'files' variable.
* tests/packages.scm ("--search-paths with pattern"): New test.
This is a followup to 856ae5e. See <http://hydra.gnu.org/build/180506>
for an example of build failure.
* guix/build/gnu-build-system.scm (strip): Add #:archive-strip-flags
parameter. Use it when (ar-file? path).
* guix/build-system/gnu.scm (gnu-build): Add #:archive-strip-flags
parameter and pass it down.
* gnu/packages/commencement.scm (gcc-boot0)[arguments]: Add
#:strip-flags.
* gnu/packages/base.scm (glibc)[arguments]: Likewise.
* guix/scripts/lint.scm (run-checkers): Check
whether (current-error-port) is a tty, and print the package being
checked and the checker currently running when it is.
This will handle the new 'file-type' and 'file-pattern' fields correctly.
* guix/scripts/package.scm (search-path-environment-variables)[search-path-definition]:
Rewrite in terms of 'search-path-as-list'.
This saves 19% on the 'bin' directory of Coreutils, and certainly
helpful for things like Git's 'libexec' directory.
* guix/build-system/gnu.scm (gnu-build): Change default value for
#:strip-flags to '("--strip-all").
* guix/build/gnu-build-system.scm (strip): Ditto.
* gnu/packages/linux.scm (linux-libre)[arguments]: Add #:strip-flags.
Partly fixes <http://bugs.gnu.org/18033>.
* guix/build/utils.scm (search-path-as-list): Rename 'sub-directories'
parameter to 'files'. Add #:type parameter and honor it.
(set-path-environment-variable): Likewise. Pass #:type to
'search-path-as-list'.
* guix/packages.scm (search-path-specification->sexp): Add 'directory as
the last item of the tuple.
* guix/build/gnu-build-system.scm (set-paths): Add 'type' to search-path
pattern. Pass #:type to 'set-path-environment-variable'.
Reported by Federico Beffa <beffa@ieee.org>
and Eric Bavier <ericbavier@gmail.com>.
* guix/build-system/python.scm (package-with-explicit-python): Do
nothing when P's build system is not PYTHON-BUILD-SYSTEM.
Fixes a bug whereby removing the next-to-last item in a profile would
lead to an obscure error, as shown at
<http://lists.gnu.org/archive/html/guix-devel/2014-12/msg00292.html>.
Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.
* guix/profiles.scm (profile-derivation)[inputs]: Use (list info-dir
"out") instead of just INFO-DIR.
Suggested by Mark H Weaver <mhw@netris.org>
in <http://bugs.gnu.org/19138>.
* guix/build/utils.scm (wrap-program): Change wrapper to use "exec -a
PROG" instead of just "exec".
Fixes <http://bugs.gnu.org/19321>.
Reported by Mark H Weaver <mhw@netris.org>.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Change default
value of #:glib-or-gtk-wrap-excluded-outputs to ''().
This would not work when /boot is a separate partition, as reported by
Nikita Karetnikov <nikita@karetnikov.org> in <http://bugs.gnu.org/19220>.
This fixes a regression introduced in 39d1f82.
* gnu/build/install.scm (install-grub): Copy GRUB.CFG instead of
symlinking it, as was the case before 39d1f82.
* gnu/build/vm.scm (register-grub.cfg-root): Add 'grub.cfg' parameter.
Make it a permanent GC root instead of an indirect GC root.
(initialize-hard-disk): Adjust accordingly.
* guix/scripts/system.scm (install-grub*): Replace use of
'add-indirect-root' by the addition of a permanent GC root in
%GC-ROOTS-DIRECTORY.
Fixes <http://bugs.gnu.org/19279>.
Fixes a regression introduced in cc7fa59.
Reported by Tomas Cech <tcech@suse.cz>.
* guix/scripts/system.scm (install): Fix order of arguments to 'lift'
and 'lift2'.
Appending to "raw" args broke optional parameters in 'guix package -I'
and 'guix package -A', and possibly other places. Therefore, switch to
parsing each set of options on its own and append resulting alists
together afterwards.
* guix/scripts/archive.scm (parse-options-from): Rename from
(parse-options) and add explicit argument. New form of (parse-options)
using its old algorithm via -from function.
* guix/scripts/build.scm: Ditto.
* guix/scripts/environment.scm: Ditto.
* guix/scripts/package.scm: Ditto.
* guix/scripts/system.scm: Ditto.
* tests/guix-package.sh: Add test.
* doc/guix.texi (Invoking guix build): Make it clear that the options
are parsed independently.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Fixes <http://bugs.gnu.org/19160>.
* guix/scripts/system.scm (install-grub*): Make /boot/grub/grub.cfg an
indirect GC root.
* gnu/build/install.scm (install-grub): Make TARGET a symlink.
* gnu/build/vm.scm (register-grub.cfg-root): New procedure.
(initialize-hard-disk): Use it.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Add
#:glib-or-gtk-wrap-excluded-outputs parameter and honor it.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Add
#:glib-or-gtk-wrap-excluded-outputs parameter and pass it in BUILDER.
* doc/guix.texi (Build Systems): Mention it.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Move body
to 'handle-output' inner procedure, and parametrize it by output name
and directory. Call it for each element of OUTPUTS.
(compile-glib-schemas): Likewise.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Use
'for-each' instead of 'map' in for-effect contexts. Use 'cut' instead
of 'lambda' when appropriate.
Reported by Andreas Enge <andreas@enge.fr>.
* guix/gnu-maintenance.scm (sans-extension): Add case for ".zip".
(%tarball-rx): Extend to handle .zip extension.
* guix/scripts/substitute-binary.scm (fetch): Change "unresponsive" to
"somewhat slow". I'm being told that the former is often
misunderstood as "broken".
* guix/build/utils.scm (substitute): Clarify first sentence of
docstring and add warning to the docstring about using '$' to match
an end of line.
(substitute*): Add warning to the docstring about using '$' to match
an end of line.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/build/gnu-build-system.scm (strip): Check whether 'file-exists?'
before calling 'elf-file?' and 'ar-file?'. This should fix build
failures in the presence of dangling symlinks, as in
<http://hydra.gnu.org/build/167521/nixlog/1/raw>.
This avoids uncaught exceptions when the 'strip' phase would call these
procedures on symlinks to directories, such as 'lib/terminfo' in
ncurses (see <http://hydra.gnu.org/build/167310/nixlog/1/tail-reload>.)
* guix/build/utils.scm (file-header-match): Catch 'system-error', and
return #f upon EISDIR.
Fixes <http://bugs.gnu.org/18534>.
* guix/scripts/pull.scm (with-environment-variable, with-PATH): New
macros.
(temporary-directory, first-directory, interned-then-deleted): New
procedures.
(unpack): Rewrite to do the unpacking in the current process rather
than as a separate derivation.
(%self-build-file): New variable.
(build-from-source): New procedure.
(build-and-install): Use it.
* guix/build/pull.scm (build-guix): Rename 'tarball' argument to
'source'. Remove #:tar and #:gzip parameters, as well as 'tar'
invocation. Remove 'scandir' invocation. Wrap body in
'with-directory-excursion'.
* build-aux/build-self.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
* guix/gexp.scm (gexp->derivation): Add #:module-path parameter, and
pass it to 'imported-modules' and 'compiled-modules'.
* doc/guix.texi (G-Expressions): Adjust accordingly.
* gnu/system/vm.scm (system-qemu-image/shared-store): Add
#:disk-image-size and #:full-boot? parameters and honor them. Pass
'#:copy-inputs? full-boot?', and change #:inputs argument.
* guix/scripts/system.scm (system-derivation-for-action): Pass
#:disk-image-size to 'system-qemu-image/shared-store'.
* doc/guix.texi (Invoking guix system): Mention use of '--image-size' in
conjunction with '--full-boot'.
* guix/scripts/lint.scm (starts-with-abbreviation?): New procedure.
(check-synopsis-style)[check-start-with-package-name]: Use it.
* tests/lint.scm ("synopsis: start with abbreviation"): New test.
* guix/scripts/lint.scm (package-name-regexp): New procedure.
(check-synopsis-style)[check-start-with-package-name]: Use it instead
of 'string-prefix-ci?'.
* tests/lint.scm ("synopsis: start with package name prefix"): New test.
* guix/store.scm (run-gc): Add calls to 'hash-clear!'.
* tests/store.scm ("add-text-to-store vs. delete-paths",
"add-to-store vs. delete-paths"): New tests.
Reported by Andreas Enge <andreas@enge.fr>.
* guix/packages.scm (first-value): New macro.
(package-transitive-supported-systems): Rewrite to traverse all the
DAG rooted at PACKAGE.
* tests/packages.scm ("package-transitive-supported-systems"): Add 'd'
and 'e', and test them.
Thanks to Mark H. Weaver <mhw@netris.org> for insightful discussions
and suggestions.
* guix/packages.scm (<package>)[graft]: New field.
(patch-and-repack): Invoke 'package-derivation' with #:graft? #f.
(package-source-derivation): Likewise. Do not use (%guile-for-build)
in call to 'patch-and-repack', and we could end up using a grafted
Guile.
(expand-input): Likewise, also for 'package-cross-derivation' call.
(package->bag): Add #:graft? parameter. Honor it. Use 'strip-append'
instead of 'package-full-name'.
(input-graft, input-cross-graft, bag-grafts, package-grafts): New
procedures.
(package-derivation, package-cross-derivation): Add #:graft? parameter
and honor it.
* gnu/packages/bootstrap.scm (package-with-bootstrap-guile): Add
recursive call on 'graft'.
* guix/build-system/gnu.scm (package-with-explicit-inputs,
package-with-extra-configure-variable, static-package): Likewise.
(gnu-build): Use the ungrafted Guile to avoid full rebuilds.
(gnu-cross-build): Likewise.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/build-system/python.scm (python-build): Likewise.
* guix/build-system/ruby.scm (ruby-build): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Likewise.
* tests/packages.scm ("package-derivation, direct graft",
"package-cross-derivation, direct graft", "package-grafts,
indirect grafts", "package-grafts, indirect grafts, cross",
"package-grafts, indirect grafts, propagated inputs",
"package-derivation, indirect grafts"): New tests.
("bag->derivation", "bag->derivation, cross-compilation"): Wrap in
'parameterize'.
* doc/guix.texi (Security Updates): New node.
(Invoking guix build): Document --no-graft.
* guix/scripts/environment.scm (show-help): Align --pure and
--search-paths with other long options; add 'newline' call before
'show-bug-report-information' call.
* guix/tests.scm (derivation-narinfo, call-with-derivation-narinfo): New
procedures.
(with-derivation-narinfo): New macro.
* tests/derivations.scm ("derivation-prerequisites-to-build and
substitutes"): Use them.
* guix/scripts/lint.scm (check-description-style): Exception for
upper-case rule if the description starts with the package name.
* tests/lint.scm: Test it.
* guix/scripts/lint.scm (start-with-capital-letter?): Rename too...
(properly-starts-sentence?): Rewrite with regex and add digits.
(check-description-style, check-synopsis-style): Use it.
* tests/lint.scm: Add tests.
* guix/scripts/lint.scm (start-with-capital-letter?): Handle empty
strings.
(check-description-style): New check for end-of-sentence space.
* tests/lint.scm: Test it.
The procedure version-prefix truncates a version string to a certain
number of components. version-major+minor is a special case of this,
which extracts the "major.minor" part of the string. Previously this
was handled by an expression common to several packages.
* guix/utils.scm (version-prefix, version-major+minor): New procedures
* gnu/packages/backup.scm (duplicity): Use version-major+minor.
* gnu/packages/cmake.scm (cmake): Likewise.
* gnu/packages/gnome.scm (libbonobo, libbonoboui): Likewise.
* gnu/packages/gnutls.scm (gnutls): Likewise.
* gnu/packages/mail.scm (gmime): Likewise.
* gnu/packages/mpd.scm (mpd): Likewise.
* gnu/packages/mpi.scm (openmpi): Likewise.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Fixes downloads from https://alioth.debian.org.
Reported by John Darrington <jmd@gnu.org>.
* guix/build/download.scm (http-fetch)[headers]: Add 'Accept'.
* guix/packages.scm (package-transitive-supported-systems): New procedure.
* tests/packages.scm ("package-transitive-supported-systems"): New test.
* build-aux/hydra/gnu-system.scm (package->job): Use it.
* guix/derivations.scm (<graft>): New record type.
(graft-derivation): Rename 'replacements' to 'grafts', and expect it
to be a list of <graft> records. Adjust accordingly.
* tests/derivations.scm ("graft-derivation"): Use 'graft' instead of
pairs in argument to 'graft-derivation'.
See <https://bugs.gnu.org/18747> for the original report.
* guix/download.scm (url-fetch): Comment out #:local-build? argument.
* guix/git-download.scm (git-fetch): Likewise.
* guix/svn-download.scm (svn-fetch): Likewise.
This reduces run time of (package-derivation s emacs) by ~1.5%.
* guix/utils.scm (bytevector->base16-string): Traverse BV from the end
so as to use 'string-concatenate' instead of
'string-concatenate-reverse'.
This reduces run time of (package-derivation s emacs) by ~5%.
* guix/derivations.scm (search-path*): New procedure.
(imported-modules): Use it instead of 'search-path'.
This reduces run time of (package-derivation s emacs) by ~10%.
* guix/derivations.scm (derivation-path->base16-hash): New procedure.
(derivation-hash): Use it.
* guix/scripts/package.scm (switch-to-generation): New procedure.
(switch-to-previous-generation): Use it.
(guix-package): Adjust for '--switch-generation' option.
* tests/guix-package.sh: Test it.
* doc/guix.texi (Invoking guix package): Document it.
* guix/scripts/substitute-binary.scm (%cache-url): Ignore the
'GUIX_BINARY_SUBSTITUTE_URL' environment variable.
* test-env.in: Invoke 'guix-daemon' with '--substitute-urls'.
* tests/substitute-binary.scm: Set '%cache-url' to the value of
'GUIX_BINARY_SUBSTITUTE_URL'.