Commit Graph

3659 Commits

Author SHA1 Message Date
Ludovic Courtès fb585745ad distro: Use our own Perl during bootstrap.
* distro/base.scm (linux-headers-boot0): Use PERL with %BOOT0-INPUTS
  instead of calling out to `nixpkgs-derivation*'.
2012-09-12 00:07:51 +02:00
Ludovic Courtès dc0a9729dd distro: gcc: Add a RUNPATH on libc.
* distro/base.scm (gcc-4.7): Remove unnecessary "libc" input.
  Add `-rpath LIBC/lib' to `LIB_SPEC'.
2012-09-12 00:07:12 +02:00
Ludovic Courtès b289e9f9dd distro: Add Perl.
* distro/base.scm (perl): New variable.
* distro/patches/perl-no-sys-dirs.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.
2012-09-11 22:17:20 +02:00
Ludovic Courtès 321b099643 distro: Bootstrap via a cross-toolchain.
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.
2012-09-11 22:08:55 +02:00
Ludovic Courtès be13fbfa83 Add (guix build-system trivial).
* 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.
2012-09-10 22:47:10 +02:00
Ludovic Courtès 3c0670e686 distro: Reduce the bootstrap set.
* distro/base.scm (%bootstrap-inputs): Remove `gnumake', `diffutils',
  and `findutils'.
  (gnu-make-boot0, diffutils-boot0, findutils-boot0, %boot0-inputs): New
  variables.
  (binutils-boot0, gcc-boot0, linux-headers-boot0, %boot1-inputs):
  Replace %BOOTSTRAP-INPUTS by %BOOT0-INPUTS.

  (final-inputs): Remove now unneeded call to
  `source-properties->location'.
2012-09-07 15:49:48 +02:00
Ludovic Courtès 2d14ef0f2c build-system/gnu: Fix `#:path-exclusions' handling.
* guix/build/gnu-build-system.scm (set-paths)[relevant-input-directories]:
  New procedure.  Use it.  This fixes #:path-exclusions handling.
2012-09-06 22:58:43 +02:00
Ludovic Courtès 9d9ef458e8 utils: Make `set-path-environment-variable' verbose.
* guix/build/utils.scm (set-path-environment-variable): Print ENV-VAR
  and its value.
2012-09-06 22:57:46 +02:00
Ludovic Courtès 5f805fdf17 distro: Bootstrap with a joint GCC/Binutils/GMP/MPFR/MPC build.
* 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.
2012-09-06 00:05:06 +02:00
Ludovic Courtès 181df11887 distro: gcc: Avoid retention of reference to `sed'.
* distro/base.scm (gcc-4.7)[pre-configure]: Patch fixincl.x.
2012-09-06 00:01:41 +02:00
Ludovic Courtès 5f45668080 distro: glibc: Assume a recent Linux kernel.
* distro/base.scm (glibc): Pass "--enable-kernel=2.6.30".
2012-09-06 00:00:34 +02:00
Ludovic Courtès dc1045be7d packages: Accept <origin> as package inputs.
* guix/packages.scm (package-derivation): Accept use of an <origin> as
  an input.
2012-09-06 00:00:00 +02:00
Ludovic Courtès 1f34bda1e2 build-system/gnu: Relax location handling in `package-with-explicit-inputs'.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Convert LOC
  when it is a source-property list.
2012-09-05 23:59:23 +02:00
Ludovic Courtès a08cdce7ed distro: mpc: Upgrade to 1.0.
* distro/base.scm (mpc): Upgrade to 1.0.
2012-09-05 21:47:26 +02:00
Ludovic Courtès 2847050a61 packages: Add `package-full-name'.
* guix/packages.scm (package-full-name): New procedure.
  (package-derivation): Use it.
2012-09-05 19:01:47 +02:00
Ludovic Courtès 609354bf0a guix-build: Add `--derivations'.
* guix-build.in (show-help): Add `--derivations'.
  (%options): Likewise.
  (guix-build): Handle it.
2012-09-04 23:43:24 +02:00
Ludovic Courtès 5dba31494e guix-build: Add `--source'.
* guix-build.in (derivations-from-package-expressions): Add `source?'
  parameter.  Honor it.
  (show-help): Add `--source'.
  (%options): Likewise.
  (guix-build): Honor `--source'.
2012-09-04 23:42:06 +02:00
Ludovic Courtès ff352cfb97 Move <location> to (guix utils).
* guix/packages.scm (<location>, location): Move to...
* guix/utils.scm: ... here.
2012-09-03 01:07:01 +02:00
Ludovic Courtès ea52a52d7c distro: bash, readline: Correctly set RUNPATH to the dependencies.
* distro/base.scm (readline): Add configure flags to set an rpath on
  ncurses.
  (bash): Add configure flags to set an rpath to readline and ncurses.
2012-09-03 01:06:58 +02:00
Ludovic Courtès 6818af7ba5 distro: Add bzip2.
* distro/base.scm (bzip2): New variable.
  (%final-inputs): Add bzip2.
2012-09-02 23:12:17 +02:00
Ludovic Courtès 60f984b262 distro: Bootstrap standard inputs from Nixpkgs.
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.
2012-09-02 20:05:39 +02:00
Ludovic Courtès 113aef68fb packages: Add `package-transitive-propagated-inputs'.
* guix/packages.scm (transitive-inputs): New procedure.
  (package-transitive-inputs): Rewrite in terms of `transitive-inputs'.
  (package-transitive-propagated-inputs): New procedure.
2012-09-02 19:58:03 +02:00
Ludovic Courtès a2ebaddda7 packages: Cache the result of `package-derivation'.
* guix/packages.scm (%derivation-cache): New variable.
  (cache, cached-derivation): New procedures.
  (package-derivation): Use them.
2012-09-02 19:40:08 +02:00
Ludovic Courtès 8bb9f66fc6 distro: recutils: Allow builds with glibc 2.16+.
* distro/base.scm (recutils): Apply. `diffutils-gets-undeclared.patch'.
2012-09-02 19:01:28 +02:00
Ludovic Courtès 0a3da5b7f0 distro: glibc: Propagate Linux headers.
* distro/base.scm (glibc): Move LINUX-HEADERS from `native-inputs' to
  `propagated-inputs'.  Remove unnecessary `_' in /bin/pwd substitution.
2012-09-02 19:01:28 +02:00
Ludovic Courtès a5071b990d distro: diffutils: Allow builds with glibc 2.16+.
* distro/patches/diffutils-gets-undeclared.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.

* distro/base.scm (diffutils): Apply. `diffutils-gets-undeclared.patch'.
2012-09-02 16:13:49 +02:00
Ludovic Courtès 472894aae8 distro: tar: Allow builds with glibc 2.16+.
* distro/patches/tar-gets-undeclared.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.

* distro/base.scm (tar): Apply. `tar-gets-undeclared.patch'.
2012-09-02 16:05:41 +02:00
Ludovic Courtès 946b72c924 packages: Add a printer for <package>.
* guix/packages.scm (<package>): Add record printer.
2012-09-02 15:41:52 +02:00
Ludovic Courtès aaa848f3af Optimize `write-derivation' and `derivation-path->output-path'.
* guix/derivations.scm (write-derivation): Explicitly use
  `simple-format'.
  (derivation-path->output-path): Memoize.
2012-09-02 01:51:52 +02:00
Ludovic Courtès f39bd08ad2 Optimize `store-path?'.
* guix/store.scm (store-path?): Check with `string-prefix?' instead of a
  regexp.
2012-09-01 23:38:28 +02:00
Ludovic Courtès d118c548b5 build-system/gnu: Really apply patches.
* guix/build/gnu-build-system.scm (patch): Use `--input FILE', not just
  `FILE'.
2012-09-01 19:21:33 +02:00
Ludovic Courtès 8197c978ef utils: Change `substitute*' to allow iteration over several matches.
* 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.
2012-09-01 19:21:31 +02:00
Ludovic Courtès 9dd036f35c distro: m4: Add patch to allow builds with glibc 2.16+.
* distro/base.scm (m4): Use `m4-gets-undeclared.patch'.

* distro/patches/m4-gets-undeclared.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.
2012-09-01 11:52:52 +02:00
Ludovic Courtès 6dd7787c39 Add a `guile-for-build' parameter to `build-expression->derivation'.
* guix/derivations.scm (%guile-for-build): Use `nixpkgs-derivation*'
  instead of `nixpkgs-derivation'.
  (build-expression->derivation): New `guile-for-build' keyword
  parameter.  Use it.
2012-09-01 11:45:52 +02:00
Ludovic Courtès 4c1eddf766 Add an `env-vars' keyword parameter to `build-expression->derivation'.
* guix/derivations.scm (build-expression->derivation): New `env-vars'
  keyword parameter; default to '().  Use it.
2012-09-01 11:33:20 +02:00
Ludovic Courtès dc4e02572e build-system/gnu: Add `path-exclusions' parameter.
* 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.
2012-09-01 01:14:31 +02:00
Ludovic Courtès f1f100b297 distro: gcc: Allow `libstdc++' to be found.
* distro/base.scm (gcc-4.7): Add `-rpath' arguments to `LIB_SPEC' to
  allow `libstdc++' to be found by users.
2012-09-01 00:35:12 +02:00
Ludovic Courtès 6e0874db3d distro: gcc: Pass #:strip-binaries?.
* distro/base.scm (gcc-4.7): Pass #:strip-binaries?.
2012-09-01 00:33:23 +02:00
Ludovic Courtès 877217b85a build-system/gnu: Honor the `patch-shebangs?' and `strip-binaries?' parameters.
* guix/build/gnu-build-system.scm (patch-shebangs): Honor
  PATCH-SHEBANGS?.
  (strip): Honor STRIP-BINARIES?.  Display a message from `strip-dir'.
2012-08-31 23:58:21 +02:00
Ludovic Courtès 8759a648ba guix-build: Fix the "unrecognized option" error message.
* guix-build.in (guix-build): Show the option name when an unrecognized
  option is passed.
2012-08-31 17:05:34 +02:00
Ludovic Courtès e815763e69 build-system/gnu: Add a `strip' phase.
* 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.
2012-08-31 17:04:53 +02:00
Ludovic Courtès 84209975fd build-system/gnu: Always invoke `configure' with a relative path.
* guix/build/gnu-build-system.scm (configure): Change SRCDIR to always
  be a relative path.
2012-08-30 23:30:42 +02:00
Ludovic Courtès a436d2018e distro: gcc: Do not store configure flags in the resulting binaries.
* distro/base.scm (gcc-4.7): Add a `post-configure' phase to clear
  `TOPLEVEL_CONFIGURE_ARGUMENTS' in the top-level `Makefile'.
2012-08-30 23:03:11 +02:00
Ludovic Courtès dcd60f4398 define-record-type*: Add the `inherit' syntactic constructor keyword.
* guix/utils.scm (define-record-type*)[make-syntactic-constructor]: New
  `type' parameter.  Add the `inherit' keyword and corresponding support
  code.

* tests/utils.scm ("define-record-type* & inherit", "define-record-type*
  & inherit & letrec* behavior"): New tests.
2012-08-30 00:18:50 +02:00
Ludovic Courtès c79dae6076 distro: Add missing Binutils patch.
* distro/patches/binutils-ld-new-dtags.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.
2012-08-29 00:15:39 +02:00
Ludovic Courtès 7cdeac023d distro: Add the GNU C Library.
* distro/base.scm (glibc): New variable.
2012-08-28 23:15:13 +02:00
Ludovic Courtès 3db3913ebb distro: Add Linux headers.
* distro/base.scm (linux-headers): New variable.
2012-08-28 22:31:17 +02:00
Cyprien Nicolas (fulax) 73f9a978ef configure.ac: Make 'guild' configure check fatal, otherwise one gets 'compile: command not found' during make 2012-08-27 15:44:32 +02:00
Ludovic Courtès 8f6201a31f distro: Add GNU Binutils.
* distro/base.scm (binutils): New variable.
2012-08-25 13:12:47 +02:00
Ludovic Courtès 81e57ec5ff distro: Add GCC.
* distro/base.scm (gcc-4.7): New variable.
2012-08-25 13:12:47 +02:00