* distro/patches/guile-default-utf8.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.
* distro/packages/base.scm (%guile-static): Use it.
(%guile-static-stripped): Add call to `remove-store-references'.
* distro/patches/guile-relocatable.patch: Change to use /proc/self/exe
instead of PROGRAM_INVOCATION_NAME. Useful because Nix itself passes
just the basename of builders that it executes.
* 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.
* distro/ld-wrapper.scm: New file.
* Makefile.am (MODULES): Add it.
* distro/base.scm (ld-wrapper-boot3): New variable.
(%boot3-inputs): Add LD-WRAPPER-BOOT3.
(bash-final, guile-final, ld-wrapper): New final.
(%final-inputs): Use BASH-FINAL; add LD-WRAPPER.
(gcc-4.7): Remove the `-rpath' trick from the `lib' spec string.
* distro/base.scm (gcc-4.7): Patch `LIB_SPEC' to add `-rpath' for each
`-L'. Spec string suggested by Marc Glisse <marc.glisse@inria.fr>.
(libtool): Add `libtool-skip-tests.patch'.
* distro/patches/libtool-skip-tests.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.
This allows the final toolchain to be completely independent of
%BOOTSTRAP-INPUTS.
* distro/base.scm (glibc-dynamic-linker): New procedure.
(gcc-4.7): Remove #:path-exclusions argument. Check whether LIBC is
#f before using it.
(glibc): Remove "libc_cv_as_needed" hack. Patch `Makeconfig' to
remove `-lgcc_s'.
(nix-system->gnu-triplet, boot-triplet): New variables.
(binutils-boot0): Turn into a cross-Binutils targeting (boot-triplet
SYSTEM).
(gcc-boot0): Likewise. Add configure options to make a smaller
build. Remove "binutils-source" from the input, and use
BINUTILS-BOOT0 instead.
(glibc-final): Cross-build using GCC-BOOT0 and BINUTILS-BOOT0.
(gcc-boot0-wrapped): New variable.
(%boot2-inputs): Use it.
(m4-boot2, gmp-boot2, mpfr-boot2, mpc-boot2): Remove.
(binutils-final): New variable.
(gcc-final): Turn into a joint build with GMP/MPFR/MPC. Use
BINUTILS-FINAL.
(%boot3-inputs): Adjust accordingly.
(%boot4-inputs): Remove.
(%final-inputs): Use %BOOT3-INPUTS.
* distro/base.scm (%bootstrap-inputs): Remove GMP, MPFR, and MPC.
(substitute-keyword-arguments): New macro.
(gcc-boot0): Add dependency on the Binutils, GMP, MPFR, and MPC
tarballs. Add a `unpack-binutils&co' phase to unpack them and symlink
them so they get built, and to patch errors in `configure'.
(glibc-final): Use `substitute-keyword-arguments' instead of a loop.
(gcc-final): Inherit from GCC-4.7 instead of GCC-BOOT0.
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/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/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.
* distro/base.scm (coreutils)[arguments]: Remove
"FORCE_UNSAFE_CONFIGURE" setting, since in fact, this is no problem
when using Nix with separate build users.
* distro/base.scm (readline): New variable.
(guile-1.8, guile-2.0): Use it.
* distro/readline-link-ncurses.patch: New file.
* Makefile.am (nobase_dist_guilemodule_DATA): Add it.
* 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/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/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/packages.scm (<package>)[arguments]: Default to '().
* distro/base.scm (libsigsegv, gawk): New packages.
(hello): Use GAWK instead of (nixpkgs-derivation "gawk").
* Makefile.am (MODULES): Add `guix/packages.scm' and `distro/base.scm'.
(TESTS): Add `tests/packages.scm'.
(EXTRA_DIST): New variable.
* guix/packages.scm, distro/base.scm, tests/packages.scm: New files.
* guix/http.scm (http-fetch): Make `name' an optional argument, to match
the expectations of `package-source-derivation'.