* configure.ac: Always show the result of checking for Nixpkgs. Don't
warn when Nixpkgs is not found.
* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Remove `--with-nixpkgs'
flag.
* guix/utils.scm (%nixpkgs-directory): Use either the compile-time or
the run-time `NIXPKGS' environment variable.
* release.nix (jobs.tarball, jobs.build): Remove `--with-nixpkgs'
configure flag.
* README: Mark Nixpkgs as optional.
* distro/packages/databases.scm, distro/packages/guile.scm,
distro/packages/typesetting.scm: Change uses of `nixpkgs-derivation*'
to `nixpkgs-derivation', to avoid failing at compile-time.
* guix/ui.scm: New file.
* Makefile.am (MODULES): Add it.
* po/POTFILES.in: Add it.
* guix-build.in: Use it.
(_, N_, leave): Remove.
(guix-build): Use `with-error-handling' instead of the `guard' form.
* guix-download.in: Use it.
(_, N_, leave): Remove.
* guix/store.scm (add-indirect-root): New operation.
* guix-build.in (show-help): Document `--root'.
(%options): Add `--root'.
(guix-build)[register-root]: New procedure. Call it when `--root' is
passed.
* guix/build/utils.scm (substitute*): Remove special syntax for
list-of-files; instead, check whether FILE is `list?' at run time.
* distro/packages/base.scm (gcc-4.7, %binutils-static): Adjust
accordingly.
* guix/packages.scm (package-source-derivation): Add `system'
parameter. Pass it to METHOD.
(package-derivation)[expand-input]: Pass SYSTEM to
`package-derivation' and `package-source-derivation'.
* distro/packages/base.scm (package-with-bootstrap-guile)[boot]: Pass
SYSTEM to FETCH.
* guix/derivations.scm (imported-files): Call
`build-expression->derivation' with SYSTEM, not (%current-system).
(build-expression->derivation): Pass SYSTEM to `imported-modules' and
`compiled-modules'.
* guix/derivations.scm (%guile-for-build): Initialize to #f.
(imported-files, imported-modules, compiled-modules): Add `guile'
keyword parameter. Pass it down to `build-expression->derivation'.
(build-expression->derivation)[guile-drv]: New variable. Pass it as
the #:guile parameter for `imported-modules' and `compiled-modules'.
* tests/derivations.scm: Set %GUILE-FOR-BUILD to the derivation of
%BOOTSTRAP-GUILE.
* guix/derivations.scm (imported-files)[parent-dirs]: Move to...
(parent-directories): ... here. New procedure.
(compiled-modules): New procedure.
(build-expression->derivation): Use it.
* tests/derivations.scm ("build-expression->derivation with modules"):
New test.
* guix/packages.scm (package-derivation)[intern]: New procedure. Pass
#t as the `recursive?' argument, instead of #f.
[expand-input]: New procedure, with code formerly in the body.
Support inputs where the input is a procedure returning a file name or
an <origin>.
Use `expand-input' in the body.
* tests/packages.scm ("trivial with system-dependent input"): New test.
* guix/build/http.scm (open-connection-for-uri): New procedure.
(http-fetch): Use it. Pass the result as a #:port argument to
`http-get'.
Add hack to modify the `set-port-encoding!' binding in (web response).
* guix/ftp-client.scm (ftp-open): Add optional `port' parameter,
defaulting to 21. When calling `getaddrinfo', convert PORT to a
string and pass AI_NUMERICSERV when PORT is a number.
* distro/packages/base.scm (%guile-static, %guile-static-stripped): New
variables.
* distro/patches/guile-relocatable.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.
* guix/packages.scm (%derivation-cache): Pass an initial size of 100.
(cache): Use `hashq-set!', and use a SYSTEM/DRV pair as the value.
(cached-derivation): Update accordingly.
* guix/build-system/gnu.scm (package-with-explicit-inputs): New `guile'
keyword parameter. Add it to P's arguments, and pass it in recursive
calls.
(gnu-build): New `guile' keyword parameter; new `guile-for-build'
variable. Pass it as the `#:guile-for-build' parameter of
`build-expression->derivation'.
* guix/build-system/trivial.scm (trivial-build): Likewise.
* guix/build/gnu-build-system.scm (%parallel-job-count): New variable.
(build, check): Use it instead of $NIX_BUILD_CORES.
* guix-build.in (guix-build): Default to 0 for the #:build-cores option.
* guix/build-system/trivial.scm: New file.
* Makefile.am (MODULES): Add it.
* tests/packages.scm ("trivial"): New test.
* guix/packages.scm (package-derivation): Allow SOURCE to be #f.
This is a first step towards bootstrapping from a set of pre-built,
statically-linked binaries.
* guix/build-system/gnu.scm (package-with-explicit-inputs,
standard-inputs): New procedure.
(%store): New variable.
(%standard-inputs): Remove.
(gnu-build): New `implicit-inputs?' keyword parameter. Use it to
choose whether to use `(standard-inputs SYSTEM)' or the empty list.
* distro/base.scm (guile-2.0): Remove dependency on XZ, which is now
implicit.
(%bootstrap-inputs, gcc-boot0, binutils-boot0, linux-headers-boot0,
%boot1-inputs, glibc-final, %boot2-inputs, m4-boot2, gmp-boot2,
mpfr-boot2, mpc-boot2, %boot3-inputs, gcc-final, %boot4-inputs,
%final-inputs): New variables.
* guix/packages.scm (transitive-inputs): New procedure.
(package-transitive-inputs): Rewrite in terms of `transitive-inputs'.
(package-transitive-propagated-inputs): New procedure.
* guix/build/utils.scm (substitute): Do not pass the OUT to PROC; use
`list-matches' instead of `regexp-exec' and pass a list of matches to
PROC. Expect PROC to return a string, and output that. Fold over
RX+PROC in order. Use `(read-line p 'concat)' to include the trailing
delimiter in LINE.
(substitute*): Produce code to iterate over the matches, and return a
string, which includes anything from the original line that's in
between matches.
* distro/base.scm (gcc-4.7, glibc): Adjust accordingly: remove use
of (ice-9 regex) and `regexp-substitute/global'; return a string.
* guix/derivations.scm (%guile-for-build): Use `nixpkgs-derivation*'
instead of `nixpkgs-derivation'.
(build-expression->derivation): New `guile-for-build' keyword
parameter. Use it.
* guix/build/gnu-build-system.scm (set-paths): Add new `path-exclusions'
parameter; honor it.
* guix/build-system/gnu.scm (gnu-build): New `path-exclusions' keyword
parameter; pass it to BUILDER.
* distro/base.scm (gcc-4.7): Exclude "libc" from $LIBRARY_PATH.
* guix/build/gnu-build-system.scm (strip): New procedure.
(%standard-phases): Add it.
* guix/build-system/gnu.scm (gnu-build): New `strip-binaries?',
`strip-flags', and `strip-directories' keyword parameters. Pass them
to BUILDER.
* guix/packages.scm (&package-error, &package-input-error): New
condition types.
(package-derivation): Raise a `&package-input-error' when no match is
made.
* guix/build/utils.scm (patch-shebang): Add an optional `path'
parameter. Change SHEBANG-RX to match the whole interpreter file
name. Don't patch when BIN and CMD are the same. Add docstring.
* guix/build/gnu-build-system.scm (patch-shebangs): New procedure.
(%standard-phases): Add it.
* guix/build-system/gnu.scm (gnu-build): New `patch-shebangs?' keyword
parameter. Pass it to the builder's `gnu-build'.
* Makefile.am (.scm.go): Define $NIX_INSTANTIATE.
(TESTS_ENVIRONMENT): Likewise, and define $NIX_HASH.
* guix/utils.scm (nixpkgs-derivation): Use $NIX_INSTANTIATE when
defined.
* tests/utils.scm (%nix-hash): New variable.
("sha256 & bytevector->nix-base32-string"): Use it.
* guix/packages.scm (package-transitive-inputs): New procedure.
(package-derivation): Use it to compute INPUTS.
* tests/packages.scm (dummy-package): New macro.
("package-transitive-inputs"): New test.
* guix/build/utils.scm (substitute): Change to accept a `pattern+procs'
parameter. Iterate over it.
(substitute*): Adjust accordingly.
* distro/base.scm (guile-1.8): Adjust accordingly.
* guix/build/utils.scm (let-matches, substitute*): New macros.
* distro/base.scm (guile-1.8): Use `substitute*' instead of
`substitute'. Remove the #:modules argument.
* guix/build/gnu-build-system.scm (set-paths): Dump the value of
environment variables in the `environment-variables' files, similar to
what Nixpkgs does.
* guix/build/gnu-build-system.scm (patch): New procedure.
(%standard-phases): Add `patch'.
* guix/build-system/gnu.scm (gnu-build): Add `patches' and `patch-flags'
parameters. Pass them on.
* guix/packages.scm (<package-source>): Rename to...
(<origin>): ... this. Update users.
* distro/base.scm (libsigsegv, gawk, hello): Adjust to renaming; refer
to VERSION to build the URL.
* guix/utils.scm (define-record-type*)[make-syntactic-constructor]: Bind
all the ((FIELD VALUE) ...) in a `letrec*'. Adjust `field-value'
accordingly.
* tests/utils.scm ("define-record-type* with letrec* behavior"): New
test.
* guix/packages.scm (package-derivation): When ARGS is a procedure, call
(ARGS SYSTEM).
* distro/base.scm (gawk)[arguments]: Turn into a procedure, to disable
tests on Cygwin.
* guix/derivations.scm (write-derivation)[coalesce-duplicate-inputs]:
New procedure.
Use it to process INPUTS.
* tests/derivations.scm ("user of multiple-output derivation"): New
test.
We were already relying on the new version in `set-build-options', so
this patch fixes that.
* guix/store.scm (%protocol-version): Increase.
(open-connection)[reserve-space?]: New argument. Pass it to the
server when it's recent enough.
* guix/derivations.scm (derivation-prerequisites,
derivation-prerequisites-to-build): New procedures.
* tests/derivations.scm ("build-expression->derivation and
derivation-prerequisites", "build-expression->derivation and
derivation-prerequisites-to-build"): New tests.