Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>.
* guix/http-client.scm (make-delimited-input-port): New procedure.
Install it in (web response) for Guile <= 2.0.9.
* guix/profiles.scm (ghc-package-cache-file): New procedure.
(profile-derivation): Add 'ghc-package-cache?' keyword argument. If true
(the default), add the result of 'ghc-package-cache-file' to 'inputs'.
* guix/scripts/package.scm (guix-package)[process-actions]: Pass
#:ghc-package-cache? to 'profile-generation'.
* tests/packages.scm ("--search-paths with pattern"): Likewise.
* tests/profiles.scm ("profile-derivation"): Likewise.
* guix/build/haskell-build-system.scm (%standard-phases): move 'haddock phase
before 'install phase.
* guix/build/haskell-build-system.scm (haddock): Simplify it as the 'install
phase takes care of copying files.
* guix/build/haskell-build-system.scm (configure): Add '--libsubdir' flag.
Fix use of '--extra-include-dirs' and '--extra-lib-dirs' flags. Use 'doc',
'bin' and 'lib' outputs if they are defined.
* guix/build/haskell-build-system.scm (make-ghc-package-database, register):
Aligh location of 'package.conf.d' directory with '--libsubdir' flag.
* guix/scripts/package.scm (delete-matching-generations): Remove call to
'exit' when PATTERN is "0". Call 'leave' instead of 'exit'
when (null-list? number).
Fixes <http://bugs.gnu.org/19978>.
Reported by taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer).
* guix/scripts/package.scm (delete-matching-generations): Warn when
CURRENT is in NUMBERS, and always remove it before calling
'delete-generations'.
* tests/guix-package.sh: Add --switch-generation=2 invocation before
--delete-generations=3 invocation.
Add --delete-generations=1.. test case.
* guix/scripts/package.scm (delete-matching-generations): New procedure,
with code formerly found...
(guix-package)[process-actions]: ... here. Use it.
Remove 'current-generation-number'.
* guix/store.scm (<path-info>): New record type.
(read-path-info): New procedure.
(read-arg): Add 'path-info' syntax.
(query-path-info): New variable.
* tests/store.scm ("query-path-info"): New test.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Also
wrap binaries in libexec/, such as those launched by dbus services.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix/gexp.scm (<local-file>): New record type.
(local-file): New procedure.
(local-file-compiler): New compiler.
(gexp->sexp) <struct? thing>: Handle the case where 'lower' returns a
file name.
(text-file*): Update docstring.local-file doc
* tests/gexp.scm ("one local file", "gexp->derivation, local-file"): New
tests.
* doc/guix.texi (G-Expressions): Mention local files early. Document
'local-file'. Update 'text-file*' documentation.
Before that, "guix build qt", when only qt itself is missing, would lead
'substitution-oracle' to call 'substitutable-paths' with 318 items.
Now, this is down to 6 items, because it doesn't ask about prerequisites
that are already valid.
* guix/derivations.scm (substitution-oracle)[valid-input?,
dependencies]: New procedures.
Use 'dependencies' and remove call to 'remove'.
* guix/derivations.scm (valid-derivation-input?): New procedure.
(derivation-prerequisites): Add 'cut?' parameter and honor it.
* tests/derivations.scm ("derivation-prerequisites and
derivation-input-is-valid?"): New test.
Fixes <http://bugs.gnu.org/20188>.
Reported by Mark H Weaver <mhw@netris.org>.
* guix/derivations.scm (substitution-oracle): Add 'valid?' procedure.
Remove 'valid?' items from PATHS.
Fixes <http://bugs.gnu.org/20163>.
Reported by Mark H Weaver <mhw@netris.org>.
* guix/store.scm (%default-substitute-urls): New variable.
(set-build-options): Change default value of #:substitute-urls to
%DEFAULT-SUBSTITUTE-URLS.
* guix/gexp.scm (gexp-inputs): Remove 'references' parameter; add
#:native? and honor it.
[add-reference-inputs]: Distinguish between native gexp inputs, and
non-native gexp inputs. Honor 'native?' field of list inputs.
* tests/gexp.scm ("ungexp + ungexp-native, nested"): New test.
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'.
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/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'.