jackhill/guix/guix.git
11 years agodoc: Add the stub of a manual.
Ludovic Courtès [Sat, 13 Oct 2012 14:05:01 +0000 (16:05 +0200)]
doc: Add the stub of a manual.

* doc/guix.texi: New file.
* doc/fdl-1.3.texi: New file, copied from Gnulib.

* Makefile.am (info_TEXINFOS): New variable.
  (EXTRA_DIST): Add `doc/fdl-1.3.texi'.

11 years agodistro: Add missing bits from previous commit.
Ludovic Courtès [Wed, 10 Oct 2012 22:32:17 +0000 (00:32 +0200)]
distro: Add missing bits from previous commit.

* distro/packages/base.scm (default-keyword-arguments): New procedure.

11 years agodistro: First stab at building statically-linked bootstrap binaries.
Ludovic Courtès [Wed, 10 Oct 2012 22:03:31 +0000 (00:03 +0200)]
distro: First stab at building statically-linked bootstrap binaries.

* distro/packages/base.scm (static-package): New procedure.
  (%bash-static, %static-inputs, %static-binaries): New variables.

11 years agoRemove non-existent module from (guix).
Ludovic Courtès [Mon, 8 Oct 2012 21:13:51 +0000 (23:13 +0200)]
Remove non-existent module from (guix).

* guix.scm (%public-modules): Remove `snix', since that modules doesn't
  exist yet.

11 years agopackages: Fix and optimize memoization of `package-derivation'.
Ludovic Courtès [Mon, 8 Oct 2012 20:07:19 +0000 (22:07 +0200)]
packages: Fix and optimize memoization of `package-derivation'.

* 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.

11 years agopackages: Micro-optimize `package-derivation'.
Ludovic Courtès [Mon, 8 Oct 2012 19:57:14 +0000 (21:57 +0200)]
packages: Micro-optimize `package-derivation'.

* guix/packages.scm (package-derivation): Move `cache' call before the
  traversal of PACKAGE's inputs.

11 years agoderivations: Set input port to UTF-8 in `read-derivation'.
Ludovic Courtès [Fri, 5 Oct 2012 23:24:46 +0000 (01:24 +0200)]
derivations: Set input port to UTF-8 in `read-derivation'.

* guix/derivations.scm (read-derivation): Set DRV-PORT's encoding to
  UTF-8.

11 years agoUpdate the (guix) module.
Ludovic Courtès [Fri, 5 Oct 2012 23:24:46 +0000 (01:24 +0200)]
Update the (guix) module.

* guix.scm (%public-modules): Update list of current second-level
  modules.

11 years agotests: Use bootstrap and Nixpkgs inputs to be less costly.
Ludovic Courtès [Fri, 5 Oct 2012 23:24:46 +0000 (01:24 +0200)]
tests: Use bootstrap and Nixpkgs inputs to be less costly.

* tests/builders.scm (%bootstrap-inputs, %bootstrap-guile): New
  variables.
  ("gnu-build"): Use them, by setting `#:implicit-inputs? #f' and `#:guile'.

* tests/packages.scm (%bootstrap-inputs, %bootstrap-guile): New
  variables.
  ("trivial"): Pass `#:guile %bootstrap-guile'.
  ("GNU Hello"): Use `package-with-explicit-inputs' to use
  %BOOTSTRAP-GUILE and %BOOTSTRAP-INPUTS.

11 years agobuild-system/{gnu,trivial-build}: Fix handling of #:guile argument.
Ludovic Courtès [Fri, 5 Oct 2012 23:24:46 +0000 (01:24 +0200)]
build-system/{gnu,trivial-build}: Fix handling of #:guile argument.

* guix/build-system/gnu.scm (gnu-build)[guile-for-build]: Check whether
  GUILE matches string? before checking whether it matches
  derivation-path?.
* guix/build-system/trivial.scm (trivial-build)[guile-for-build]:
  Likewise.

11 years agodistro: Specify use of the bootstrap Guile for the initial derivations.
Ludovic Courtès [Fri, 5 Oct 2012 23:10:21 +0000 (01:10 +0200)]
distro: Specify use of the bootstrap Guile for the initial derivations.

* distro/packages/base.scm (%bootstrap-guile): New variable.
  (gnu-make-boot0, diffutils-boot0, findutils-boot0, binutils-boot0,
  gcc-boot0, linux-headers-boot0, glibc-final, gcc-boot0-wrapped,
  gcc-final, ld-wrapper-boot3, bash-final, guile-final): Add
  `#:guile %bootstrap-guile' to the builder's arguments.

11 years agobuild-system/{gnu,trivial}: Add a `#:guile' keyword parameter.
Ludovic Courtès [Fri, 5 Oct 2012 23:24:46 +0000 (01:24 +0200)]
build-system/{gnu,trivial}: Add a `#:guile' keyword parameter.

* 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.

11 years agoSupport build-cores = 0; change `guix-build' to default to 0.
Ludovic Courtès [Fri, 5 Oct 2012 21:21:09 +0000 (23:21 +0200)]
Support build-cores = 0; change `guix-build' to default to 0.

* 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.

11 years agoAugment `README'.
Ludovic Courtès [Thu, 4 Oct 2012 22:19:29 +0000 (00:19 +0200)]
Augment `README'.

* README (Hacking): Mention `--with-nixpkgs'.  List the autotools and
  Gettext, as suggested by Nikita Karetnikov <nikita.karetnikov@gmail.com>.

11 years agodistro: Fix typo in warning message.
Ludovic Courtès [Thu, 4 Oct 2012 21:12:41 +0000 (23:12 +0200)]
distro: Fix typo in warning message.

* distro.scm (package-files): Add missing newline in warning message.

11 years agoAdd `pre-inst-env' script.
Ludovic Courtès [Thu, 4 Oct 2012 21:12:15 +0000 (23:12 +0200)]
Add `pre-inst-env' script.

* pre-inst-env.in: New file.
* configure.ac: Add it to `AC_CONFIG_FILES' and `AC_CONFIG_COMMANDS'.

11 years agoFix and update `POTFILES.in'.
Ludovic Courtès [Thu, 4 Oct 2012 21:10:57 +0000 (23:10 +0200)]
Fix and update `POTFILES.in'.

* po/POTFILES.in: Update.

11 years agodistro: Add libgc.
Ludovic Courtès [Wed, 26 Sep 2012 21:17:39 +0000 (23:17 +0200)]
distro: Add libgc.

* distro/packages/base.scm (libgc): New variable.
  (guile-2.0): Use it.

11 years agodistro: Add pkg-config.
Ludovic Courtès [Wed, 26 Sep 2012 21:06:45 +0000 (23:06 +0200)]
distro: Add pkg-config.

* distro/packages/base.scm (pkg-config): New variable.
  (guile-2.0): Use it.
* distro/packages/guile.scm (guile-reader): Likewise.

11 years agodistro: Add the `guile', `typesetting', and `databases' package modules.
Ludovic Courtès [Wed, 26 Sep 2012 20:17:41 +0000 (22:17 +0200)]
distro: Add the `guile', `typesetting', and `databases' package modules.

* distro.scm (package-files): Adjust PREFIX-LEN to use the top-level
  directory, not %DISTRO-MODULE-DIRECTORY.
* distro/packages/base.scm (guile-reader, guile-reader/guile-1.8,
  guile-reader/guile-2.0, lout, recutils): Move to...
* distro/packages/guile.scm, distro/packages/typesetting.scm,
  distro/packages/databases.scm: ... here.  New files.
* Makefile.am (MODULES): Add them.
  (EXTRA_DIST): Add `.dir-locals.el'.

* .dir-locals.el: New file, with settings formerly in `base.scm'.

11 years agodistro: Rename (distro ...) to (distro packages ...).
Ludovic Courtès [Wed, 26 Sep 2012 19:58:48 +0000 (21:58 +0200)]
distro: Rename (distro ...) to (distro packages ...).

* distro/base.scm, distro/ld-wrapper.scm: Move to `distro/packages'.
  Adjust LD-WRAPPER-BOOT3 input file name accordingly.
* Makefile.am (MODULES): Adjust accordingly.
* distro.scm (%distro-module-directory): Change to "/distro/packages".
* guix/build-system/gnu.scm (standard-inputs): Change module name
  to (distro packages base).
* tests/packages.scm (test-packages): Likewise.

11 years agodistro: GCC: Upgrade to 4.7.2.
Ludovic Courtès [Wed, 26 Sep 2012 19:48:22 +0000 (21:48 +0200)]
distro: GCC: Upgrade to 4.7.2.

* distro/base.scm (gcc-4.7): Upgrade to 4.7.2.

11 years agodistro: Add an `ld' wrapper, to pass missing `-rpath' flags.
Ludovic Courtès [Wed, 26 Sep 2012 16:27:04 +0000 (18:27 +0200)]
distro: Add an `ld' wrapper, to pass missing `-rpath' flags.

* 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.

11 years agodistro: gcc: Patch `lib' spec to add `-rpath' for each `-L'.
Ludovic Courtès [Thu, 13 Sep 2012 22:49:39 +0000 (00:49 +0200)]
distro: gcc: Patch `lib' spec to add `-rpath' for each `-L'.

* 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.

11 years agoAdd (guix ftp) and companion modules.
Ludovic Courtès [Wed, 12 Sep 2012 21:47:49 +0000 (23:47 +0200)]
Add (guix ftp) and companion modules.

* guix/ftp-client.scm, guix/ftp.scm, guix/build/ftp.scm: New files.
* Makefile.am (MODULES): Add them.

* distro/base.scm (libffi): Use `ftp-fetch'.

11 years agodistro: Use our own Perl during bootstrap.
Ludovic Courtès [Tue, 11 Sep 2012 22:07:51 +0000 (00:07 +0200)]
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*'.

11 years agodistro: gcc: Add a RUNPATH on libc.
Ludovic Courtès [Tue, 11 Sep 2012 22:07:12 +0000 (00:07 +0200)]
distro: gcc: Add a RUNPATH on libc.

* distro/base.scm (gcc-4.7): Remove unnecessary "libc" input.
  Add `-rpath LIBC/lib' to `LIB_SPEC'.

11 years agodistro: Add Perl.
Ludovic Courtès [Tue, 11 Sep 2012 20:17:20 +0000 (22:17 +0200)]
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.

11 years agodistro: Bootstrap via a cross-toolchain.
Ludovic Courtès [Tue, 11 Sep 2012 15:36:21 +0000 (17:36 +0200)]
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.

11 years agoAdd (guix build-system trivial).
Ludovic Courtès [Mon, 10 Sep 2012 20:47:10 +0000 (22:47 +0200)]
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.

11 years agodistro: Reduce the bootstrap set.
Ludovic Courtès [Fri, 7 Sep 2012 13:49:48 +0000 (15:49 +0200)]
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'.

11 years agobuild-system/gnu: Fix `#:path-exclusions' handling.
Ludovic Courtès [Thu, 6 Sep 2012 20:58:43 +0000 (22:58 +0200)]
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.

11 years agoutils: Make `set-path-environment-variable' verbose.
Ludovic Courtès [Thu, 6 Sep 2012 20:57:46 +0000 (22:57 +0200)]
utils: Make `set-path-environment-variable' verbose.

* guix/build/utils.scm (set-path-environment-variable): Print ENV-VAR
  and its value.

11 years agodistro: Bootstrap with a joint GCC/Binutils/GMP/MPFR/MPC build.
Ludovic Courtès [Wed, 5 Sep 2012 22:05:06 +0000 (00:05 +0200)]
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.

11 years agodistro: gcc: Avoid retention of reference to `sed'.
Ludovic Courtès [Wed, 5 Sep 2012 22:01:41 +0000 (00:01 +0200)]
distro: gcc: Avoid retention of reference to `sed'.

* distro/base.scm (gcc-4.7)[pre-configure]: Patch fixincl.x.

11 years agodistro: glibc: Assume a recent Linux kernel.
Ludovic Courtès [Wed, 5 Sep 2012 22:00:34 +0000 (00:00 +0200)]
distro: glibc: Assume a recent Linux kernel.

* distro/base.scm (glibc): Pass "--enable-kernel=2.6.30".

11 years agopackages: Accept <origin> as package inputs.
Ludovic Courtès [Wed, 5 Sep 2012 22:00:00 +0000 (00:00 +0200)]
packages: Accept <origin> as package inputs.

* guix/packages.scm (package-derivation): Accept use of an <origin> as
  an input.

11 years agobuild-system/gnu: Relax location handling in `package-with-explicit-inputs'.
Ludovic Courtès [Wed, 5 Sep 2012 21:59:23 +0000 (23:59 +0200)]
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.

11 years agodistro: mpc: Upgrade to 1.0.
Ludovic Courtès [Wed, 5 Sep 2012 19:47:26 +0000 (21:47 +0200)]
distro: mpc: Upgrade to 1.0.

* distro/base.scm (mpc): Upgrade to 1.0.

11 years agopackages: Add `package-full-name'.
Ludovic Courtès [Wed, 5 Sep 2012 17:01:47 +0000 (19:01 +0200)]
packages: Add `package-full-name'.

* guix/packages.scm (package-full-name): New procedure.
  (package-derivation): Use it.

11 years agoguix-build: Add `--derivations'.
Ludovic Courtès [Tue, 4 Sep 2012 21:43:24 +0000 (23:43 +0200)]
guix-build: Add `--derivations'.

* guix-build.in (show-help): Add `--derivations'.
  (%options): Likewise.
  (guix-build): Handle it.

11 years agoguix-build: Add `--source'.
Ludovic Courtès [Tue, 4 Sep 2012 21:09:04 +0000 (23:09 +0200)]
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'.

11 years agoMove <location> to (guix utils).
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
Move <location> to (guix utils).

* guix/packages.scm (<location>, location): Move to...
* guix/utils.scm: ... here.

11 years agodistro: bash, readline: Correctly set RUNPATH to the dependencies.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
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.

11 years agodistro: Add bzip2.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
distro: Add bzip2.

* distro/base.scm (bzip2): New variable.
  (%final-inputs): Add bzip2.

11 years agodistro: Bootstrap standard inputs from Nixpkgs.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
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.

11 years agopackages: Add `package-transitive-propagated-inputs'.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
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.

11 years agopackages: Cache the result of `package-derivation'.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
packages: Cache the result of `package-derivation'.

* guix/packages.scm (%derivation-cache): New variable.
  (cache, cached-derivation): New procedures.
  (package-derivation): Use them.

11 years agodistro: recutils: Allow builds with glibc 2.16+.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
distro: recutils: Allow builds with glibc 2.16+.

* distro/base.scm (recutils): Apply. `diffutils-gets-undeclared.patch'.

11 years agodistro: glibc: Propagate Linux headers.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
distro: glibc: Propagate Linux headers.

* distro/base.scm (glibc): Move LINUX-HEADERS from `native-inputs' to
  `propagated-inputs'.  Remove unnecessary `_' in /bin/pwd substitution.

11 years agodistro: diffutils: Allow builds with glibc 2.16+.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
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'.

11 years agodistro: tar: Allow builds with glibc 2.16+.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
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'.

11 years agopackages: Add a printer for <package>.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
packages: Add a printer for <package>.

* guix/packages.scm (<package>): Add record printer.

11 years agoOptimize `write-derivation' and `derivation-path->output-path'.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
Optimize `write-derivation' and `derivation-path->output-path'.

* guix/derivations.scm (write-derivation): Explicitly use
  `simple-format'.
  (derivation-path->output-path): Memoize.

11 years agoOptimize `store-path?'.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
Optimize `store-path?'.

* guix/store.scm (store-path?): Check with `string-prefix?' instead of a
  regexp.

11 years agobuild-system/gnu: Really apply patches.
Ludovic Courtès [Sat, 1 Sep 2012 13:43:46 +0000 (15:43 +0200)]
build-system/gnu: Really apply patches.

* guix/build/gnu-build-system.scm (patch): Use `--input FILE', not just
  `FILE'.

11 years agoutils: Change `substitute*' to allow iteration over several matches.
Ludovic Courtès [Sat, 1 Sep 2012 17:21:06 +0000 (19:21 +0200)]
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.

11 years agodistro: m4: Add patch to allow builds with glibc 2.16+.
Ludovic Courtès [Sat, 1 Sep 2012 09:52:52 +0000 (11:52 +0200)]
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.

11 years agoAdd a `guile-for-build' parameter to `build-expression->derivation'.
Ludovic Courtès [Sat, 1 Sep 2012 09:45:52 +0000 (11:45 +0200)]
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.

11 years agoAdd an `env-vars' keyword parameter to `build-expression->derivation'.
Ludovic Courtès [Sat, 1 Sep 2012 09:33:20 +0000 (11:33 +0200)]
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.

11 years agobuild-system/gnu: Add `path-exclusions' parameter.
Ludovic Courtès [Fri, 31 Aug 2012 23:14:31 +0000 (01:14 +0200)]
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.

11 years agodistro: gcc: Allow `libstdc++' to be found.
Ludovic Courtès [Fri, 31 Aug 2012 22:35:12 +0000 (00:35 +0200)]
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.

11 years agodistro: gcc: Pass #:strip-binaries?.
Ludovic Courtès [Fri, 31 Aug 2012 22:33:23 +0000 (00:33 +0200)]
distro: gcc: Pass #:strip-binaries?.

* distro/base.scm (gcc-4.7): Pass #:strip-binaries?.

11 years agobuild-system/gnu: Honor the `patch-shebangs?' and `strip-binaries?' parameters.
Ludovic Courtès [Fri, 31 Aug 2012 21:58:21 +0000 (23:58 +0200)]
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'.

11 years agoguix-build: Fix the "unrecognized option" error message.
Ludovic Courtès [Fri, 31 Aug 2012 15:05:34 +0000 (17:05 +0200)]
guix-build: Fix the "unrecognized option" error message.

* guix-build.in (guix-build): Show the option name when an unrecognized
  option is passed.

11 years agobuild-system/gnu: Add a `strip' phase.
Ludovic Courtès [Fri, 31 Aug 2012 15:04:53 +0000 (17:04 +0200)]
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.

11 years agobuild-system/gnu: Always invoke `configure' with a relative path.
Ludovic Courtès [Thu, 30 Aug 2012 21:30:42 +0000 (23:30 +0200)]
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.

11 years agodistro: gcc: Do not store configure flags in the resulting binaries.
Ludovic Courtès [Thu, 30 Aug 2012 21:03:11 +0000 (23:03 +0200)]
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'.

11 years agodefine-record-type*: Add the `inherit' syntactic constructor keyword.
Ludovic Courtès [Wed, 29 Aug 2012 22:18:50 +0000 (00:18 +0200)]
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.

11 years agodistro: Add missing Binutils patch.
Ludovic Courtès [Tue, 28 Aug 2012 22:15:39 +0000 (00:15 +0200)]
distro: Add missing Binutils patch.

* distro/patches/binutils-ld-new-dtags.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.

11 years agodistro: Add the GNU C Library.
Ludovic Courtès [Tue, 28 Aug 2012 21:15:13 +0000 (23:15 +0200)]
distro: Add the GNU C Library.

* distro/base.scm (glibc): New variable.

11 years agodistro: Add Linux headers.
Ludovic Courtès [Tue, 28 Aug 2012 20:31:17 +0000 (22:31 +0200)]
distro: Add Linux headers.

* distro/base.scm (linux-headers): New variable.

11 years agoconfigure.ac: Make 'guild' configure check fatal, otherwise one gets 'compile: comman...
Cyprien Nicolas (fulax) [Sun, 26 Aug 2012 11:37:37 +0000 (13:37 +0200)]
configure.ac: Make 'guild' configure check fatal, otherwise one gets 'compile: command not found' during make

11 years agodistro: Add GNU Binutils.
Ludovic Courtès [Sat, 25 Aug 2012 11:11:13 +0000 (13:11 +0200)]
distro: Add GNU Binutils.

* distro/base.scm (binutils): New variable.

11 years agodistro: Add GCC.
Ludovic Courtès [Fri, 24 Aug 2012 11:55:54 +0000 (13:55 +0200)]
distro: Add GCC.

* distro/base.scm (gcc-4.7): New variable.

11 years agoutils: Change `substitute*' to accept a list of files to patch.
Ludovic Courtès [Sat, 25 Aug 2012 11:12:33 +0000 (13:12 +0200)]
utils: Change `substitute*' to accept a list of files to patch.

* guix/build/utils.scm (substitute*): Support a list of files as the
  first argument.

11 years agobuild-system/gnu: Add `out-of-source?' keyword parameter.
Ludovic Courtès [Thu, 23 Aug 2012 21:13:41 +0000 (23:13 +0200)]
build-system/gnu: Add `out-of-source?' keyword parameter.

* guix/build/gnu-build-system.scm (configure): Add an `out-of-source?'
  keyword parameter; build out-of-source-tree when #t.
* guix/build-system/gnu.scm (gnu-build): Add `out-of-source?' keyword
  parameter.  Pass it in BUILDER.

11 years agopackages: Raise an error condition upon invalid input.
Ludovic Courtès [Thu, 23 Aug 2012 21:09:13 +0000 (23:09 +0200)]
packages: Raise an error condition upon invalid input.

* guix/packages.scm (&package-error, &package-input-error): New
  condition types.
  (package-derivation): Raise a `&package-input-error' when no match is
  made.

11 years agodistro: coreutils: Remove erroneous hack.
Ludovic Courtès [Wed, 22 Aug 2012 15:24:38 +0000 (17:24 +0200)]
distro: coreutils: Remove erroneous hack.

* distro/base.scm (coreutils)[arguments]: Remove
  "FORCE_UNSAFE_CONFIGURE" setting, since in fact, this is no problem
  when using Nix with separate build users.

11 years agodistro: Add GNU Coreutils.
Ludovic Courtès [Wed, 22 Aug 2012 15:24:38 +0000 (17:24 +0200)]
distro: Add GNU Coreutils.

* distro/base.scm (coreutils): New variable.

11 years agodistro: Add XZ.
Ludovic Courtès [Wed, 22 Aug 2012 15:24:38 +0000 (17:24 +0200)]
distro: Add XZ.

* distro/base.scm (xz): New variable.

11 years agodistro: Add GNU gzip.
Ludovic Courtès [Wed, 22 Aug 2012 15:24:38 +0000 (17:24 +0200)]
distro: Add GNU gzip.

* distro/base.scm (gzip): New variable.

11 years agodistro: Add GNU Patch.
Ludovic Courtès [Wed, 22 Aug 2012 15:24:38 +0000 (17:24 +0200)]
distro: Add GNU Patch.

* distro/base.scm (patch): New variable.

11 years agodistro: Add GNU Diffutils.
Ludovic Courtès [Wed, 22 Aug 2012 15:24:38 +0000 (17:24 +0200)]
distro: Add GNU Diffutils.

* distro/base.scm (diffutils): New variable.

11 years agobuild: Bump version number.
Ludovic Courtès [Wed, 22 Aug 2012 15:25:09 +0000 (17:25 +0200)]
build: Bump version number.

* configure.ac: Switch to version 0.1.

11 years agoAdd `close-connection'.
Ludovic Courtès [Wed, 22 Aug 2012 15:22:46 +0000 (17:22 +0200)]
Add `close-connection'.

* guix/store.scm (close-connection): New procedure.

11 years agodistro: Move patches to their own directory.
Ludovic Courtès [Wed, 22 Aug 2012 15:24:38 +0000 (17:24 +0200)]
distro: Move patches to their own directory.

* Makefile.am (nobase_dist_guilemodule_DATA): Keep only $(MODULES).
  (patchdir): New variable.
  (dist_patch_DATA): New variable.  Patch files formerly
  in $(nobase_dist_guilemodule_DATA).
  (.scm.go): Define `DISTRO_PATCH_DIRECTORY' and
  `DISTRO_INSTALLED_PATCH_DIRECTORY'.
  (TESTS_ENVIRONMENT): Define `DISTRO_PATCH_DIRECTORY'.

* distro.scm (%patch-directory): New variable.
  (search-patch): New procedure.
* distro/base.scm: Use `search-patch' instead of `(search-path
  %load-path ...)'.

* distro/findutils-absolute-paths.patch, distro/guile-1.8-cpp-4.5.patch,
  distro/m4-readlink-EINVAL.patch, distro/m4-s_isdir.patch,
  distro/make-impure-dirs.patch: Move to `distro/patches'.

11 years agodistro: Add GNU Findutils.
Ludovic Courtès [Wed, 22 Aug 2012 13:51:17 +0000 (15:51 +0200)]
distro: Add GNU Findutils.

* distro/base.scm (findutils): New variable.
* distro/findutils-absolute-paths.patch: New file.
* Makefile.am (nobase_dist_guilemodule_DATA): Add it.

11 years agodistro: Add GNU grep.
Ludovic Courtès [Wed, 22 Aug 2012 13:22:38 +0000 (15:22 +0200)]
distro: Add GNU grep.

* distro/base.scm (grep): New variable.

11 years agodistro: Add GNU tar.
Ludovic Courtès [Wed, 22 Aug 2012 13:21:50 +0000 (15:21 +0200)]
distro: Add GNU tar.

* distro/base.scm (tar): New variable.

11 years agodistro: Add GNU sed.
Ludovic Courtès [Wed, 22 Aug 2012 13:11:12 +0000 (15:11 +0200)]
distro: Add GNU sed.

* distro/base.scm (sed): New variable.

11 years agodistro: Add GNU Bash.
Ludovic Courtès [Tue, 21 Aug 2012 16:23:51 +0000 (18:23 +0200)]
distro: Add GNU Bash.

* distro/base.scm (bash): New variable.

11 years agodistro: Add GNU Make.
Ludovic Courtès [Tue, 21 Aug 2012 16:14:57 +0000 (18:14 +0200)]
distro: Add GNU Make.

* distro/base.scm (gnu-make): New variable.
* distro/make-impure-dirs.patch: New file.
* Makefile.am (nobase_dist_guilemodule_DATA): Add it.

11 years agobuild-system/gnu: Augment $PATH with $out for `patch-shebangs'.
Ludovic Courtès [Sun, 19 Aug 2012 21:05:04 +0000 (23:05 +0200)]
build-system/gnu: Augment $PATH with $out for `patch-shebangs'.

* guix/build/gnu-build-system.scm (patch-shebangs): Add BINDIRS to
  $PATH, and pass that to `patch-shebang'.

11 years agoutils: Add a `path' argument to `patch-shebang'.
Ludovic Courtès [Sun, 19 Aug 2012 19:50:03 +0000 (21:50 +0200)]
utils: Add a `path' argument to `patch-shebang'.

* 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.

11 years agodistro: gmp: Fix typo in URL.
Ludovic Courtès [Sun, 19 Aug 2012 15:56:03 +0000 (17:56 +0200)]
distro: gmp: Fix typo in URL.

* distro/base.scm (gmp): Fix URL.

11 years agobuild-system/gnu: Add a `patch-shebangs' phase.
Ludovic Courtès [Sun, 19 Aug 2012 15:54:54 +0000 (17:54 +0200)]
build-system/gnu: Add a `patch-shebangs' phase.

* 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'.

11 years agoutils: Add `patch-shebang'.
Ludovic Courtès [Sun, 19 Aug 2012 14:44:08 +0000 (16:44 +0200)]
utils: Add `patch-shebang'.

* guix/build/utils.scm (search-path-as-string->list): New procedure.
  (dump-port, patch-shebang): New procedures.

11 years agorelease.nix: Add dependency on GNU libgcrypt.
Ludovic Courtès [Fri, 17 Aug 2012 08:45:49 +0000 (10:45 +0200)]
release.nix: Add dependency on GNU libgcrypt.

* release.nix (build)[configureFlags]: Add `--with-libgcrypt-prefix'.

11 years agobuild: Add `--with-libgcrypt-prefix'; capture the path to libgcrypt.
Ludovic Courtès [Fri, 17 Aug 2012 08:41:27 +0000 (10:41 +0200)]
build: Add `--with-libgcrypt-prefix'; capture the path to libgcrypt.

* configure.ac: Add `--with-libgcrypt-prefix'.  Substitute `LIBGCRYPT'.

* Makefile.am (.scm.go): Pass $(LIBGCRYPT).

* guix/utils.scm (%libgcrypt): New variable.
  (sha256): Use it.