guix:guix.git
6 years agodefine-record-type*: Add named "functional setters". wip-record-setters
Ludovic Courtès [Wed, 29 Aug 2012 15:19:15 +0000 (17:19 +0200)]
define-record-type*: Add named "functional setters".

* guix/utils.scm (define-record-type*)[copy-modifier,
  functional-modifiers]: New procedures.  Use them to produce
  "functional setters".

* tests/utils.scm ("define-record-type* with functional setters",
  "define-record-type* with functional setters, not inlined",
  "define-record-type* with functional setters and default values"): New
  tests.

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

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

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

6 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

6 years agopackages: Add all non-derivation paths to the store.
Ludovic Courtès [Thu, 16 Aug 2012 17:00:49 +0000 (19:00 +0200)]
packages: Add all non-derivation paths to the store.

* guix/packages.scm (package-derivation): Add all non-derivation paths
  to the store.

6 years agopackages: Allow store paths as inputs.
Ludovic Courtès [Thu, 16 Aug 2012 16:48:03 +0000 (18:48 +0200)]
packages: Allow store paths as inputs.

* guix/packages.scm (package-derivation): Allow non-derivation store
  paths as inputs.

6 years agorelease.nix: Build out of chroot.
Ludovic Courtès [Tue, 14 Aug 2012 16:52:41 +0000 (18:52 +0200)]
release.nix: Build out of chroot.

* release.nix: Add `preConfigure' and `__noChroot' attributes.

6 years agobuild: Pass the right flags for "make distcheck".
Ludovic Courtès [Tue, 14 Aug 2012 16:50:36 +0000 (18:50 +0200)]
build: Pass the right flags for "make distcheck".

* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): New variable.
* configure.ac: Define and substitute `NIX_PREFIX'.

6 years agobuild: Add `test.drv' to the distribution.
Ludovic Courtès [Tue, 14 Aug 2012 16:44:52 +0000 (18:44 +0200)]
build: Add `test.drv' to the distribution.

* Makefile.am (EXTRA_DIST): Add `tests/test.drv'.

6 years agobuild: Pass $(NIX_INSTANTIATE) to the build and test environments.
Ludovic Courtès [Tue, 14 Aug 2012 16:36:01 +0000 (18:36 +0200)]
build: Pass $(NIX_INSTANTIATE) to the build and test environments.

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

6 years agobuild: Add SRFI-64 to the distribution.
Ludovic Courtès [Tue, 14 Aug 2012 16:28:04 +0000 (18:28 +0200)]
build: Add SRFI-64 to the distribution.

* Makefile.am (MODULES): Add `srfi/srfi-64.scm' and
  `srfi/srfi-64.upstream.scm'.

6 years agobuild: Add release.nix.
Ludovic Courtès [Tue, 14 Aug 2012 15:37:48 +0000 (17:37 +0200)]
build: Add release.nix.

* release.nix: New file.
* Makefile.am (EXTRA_DIST): Add it.

6 years agodistro: Add GNU MPC.
Ludovic Courtès [Sat, 21 Jul 2012 17:17:53 +0000 (19:17 +0200)]
distro: Add GNU MPC.

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

6 years agodistro: Add GNU MPFR.
Ludovic Courtès [Sat, 21 Jul 2012 15:20:38 +0000 (17:20 +0200)]
distro: Add GNU MPFR.

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

6 years agodistro: Add GNU recutils.
Ludovic Courtès [Sat, 21 Jul 2012 15:05:27 +0000 (17:05 +0200)]
distro: Add GNU recutils.

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

6 years agodistro: Add libffi.
Ludovic Courtès [Fri, 13 Jul 2012 10:12:34 +0000 (12:12 +0200)]
distro: Add libffi.

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

6 years agodistro: Add GNU Ncurses.
Ludovic Courtès [Thu, 12 Jul 2012 16:02:09 +0000 (18:02 +0200)]
distro: Add GNU Ncurses.

* distro/base.scm (ncurses): New variable.
  (readline): Use it.

6 years agodistro: Add GNU Readline.
Ludovic Courtès [Thu, 12 Jul 2012 14:53:18 +0000 (16:53 +0200)]
distro: Add GNU Readline.

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

6 years agoguix-build: Default the number of build cores to (current-processor-count).
Ludovic Courtès [Thu, 12 Jul 2012 14:52:52 +0000 (16:52 +0200)]
guix-build: Default the number of build cores to (current-processor-count).

* guix-build.in (guix-build): Use (current-processor-count) build cores
  by default.

6 years agoAdd `nixpkgs-derivation*'; use it in the distro.
Ludovic Courtès [Wed, 11 Jul 2012 15:26:43 +0000 (17:26 +0200)]
Add `nixpkgs-derivation*'; use it in the distro.

* guix/utils.scm (nixpkgs-derivation*): New macro.

* distro/base.scm: Use it instead of `nixpkgs-derivation'.

6 years agodistro: Add GNU libunistring.
Ludovic Courtès [Wed, 11 Jul 2012 15:25:12 +0000 (17:25 +0200)]
distro: Add GNU libunistring.

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

6 years agodistro: Add GNU Libtool.
Ludovic Courtès [Wed, 11 Jul 2012 14:20:46 +0000 (16:20 +0200)]
distro: Add GNU Libtool.

* distro/base.scm (libtool): New variable.
  (guile-1.8, guile-2.0): Use it.

6 years agodistro: Add GMP.
Ludovic Courtès [Wed, 11 Jul 2012 13:48:11 +0000 (15:48 +0200)]
distro: Add GMP.

* distro/base.scm (gmp): New variable.
  (guile-1.8, guile-2.0): Use it.

6 years agodistro: Add GNU M4.
Ludovic Courtès [Wed, 11 Jul 2012 13:42:40 +0000 (15:42 +0200)]
distro: Add GNU M4.

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

* distro/m4-readlink-EINVAL.patch, distro/m4-s_isdir.patch: New files.
* Makefile.am (nobase_dist_guilemodule_DATA): Add them.

6 years agobuild: Use Automake's `gnu' option. v0.0
Ludovic Courtès [Sat, 7 Jul 2012 20:53:01 +0000 (22:53 +0200)]
build: Use Automake's `gnu' option.

* configure.ac: Use Automake's `gnu' option.
* ChangeLog, NEWS: New files.

6 years agobuild: Adjust tests to Automake 1.12.
Ludovic Courtès [Sat, 7 Jul 2012 20:50:27 +0000 (22:50 +0200)]
build: Adjust tests to Automake 1.12.

* Makefile.am (TESTS_ENVIRONMENT): Remove `guile' invocation.  Add
  semicolons, and export the variables as shown in the Automake 1.12
  manual.
  (LOG_COMPILER): New variable, with `guile' invocation.

6 years agoAdd `THANKS'.
Ludovic Courtès [Sat, 7 Jul 2012 20:39:57 +0000 (22:39 +0200)]
Add `THANKS'.

6 years agobuild: Tell xgettext that the source is UTF-8.
Ludovic Courtès [Sat, 7 Jul 2012 20:39:39 +0000 (22:39 +0200)]
build: Tell xgettext that the source is UTF-8.

* po/Makevars (XGETTEXT_OPTIONS): Add `--from-code=UTF-8'.

6 years agodistro: Add Guile-Reader.
Ludovic Courtès [Sat, 7 Jul 2012 20:39:03 +0000 (22:39 +0200)]
distro: Add Guile-Reader.

* distro/base.scm (guile-reader): New procedure.
  (guile-reader/guile-1.8, guile-reader/guile-2.0): New variables.

6 years agoUnset `LD_LIBRARY_PATH' in `build-expression->derivation'.
Ludovic Courtès [Sat, 7 Jul 2012 20:38:08 +0000 (22:38 +0200)]
Unset `LD_LIBRARY_PATH' in `build-expression->derivation'.

* guix/derivations.scm (build-expression->derivation)[prolog]: Unset
  `LD_LIBRARY_PATH'.

6 years agobuild-system/gnu: Add dependency on GNU Findutils.
Ludovic Courtès [Sat, 7 Jul 2012 20:08:35 +0000 (22:08 +0200)]
build-system/gnu: Add dependency on GNU Findutils.

* guix/build-system/gnu.scm (%standard-inputs): Add "findutils".

6 years agodistro: guile-2.0: Propagate libunistring and Libtool.
Ludovic Courtès [Sat, 7 Jul 2012 18:28:03 +0000 (20:28 +0200)]
distro: guile-2.0: Propagate libunistring and Libtool.

* distro/base.scm (guile-2.0): Propagate libunistring and Libtool.

6 years agodistro: guile-1.8: Propagate GMP and Libtool.
Ludovic Courtès [Sat, 7 Jul 2012 18:19:38 +0000 (20:19 +0200)]
distro: guile-1.8: Propagate GMP and Libtool.

* distro/base.scm (guile-1.8): Propagate GMP and Libtool.

6 years agoAdd `package-transitive-inputs'; use it to honor propagated inputs.
Ludovic Courtès [Sat, 7 Jul 2012 18:14:20 +0000 (20:14 +0200)]
Add `package-transitive-inputs'; use it to honor propagated inputs.

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

6 years agodistro: Add GNU Guile 2.0, released today!
Ludovic Courtès [Sat, 7 Jul 2012 16:41:16 +0000 (18:41 +0200)]
distro: Add GNU Guile 2.0, released today!

* distro/base.scm (guile-2.0): New variable.

6 years agobuild-system/gnu: Set $PKG_CONFIG_PATH.
Ludovic Courtès [Sat, 7 Jul 2012 16:40:39 +0000 (18:40 +0200)]
build-system/gnu: Set $PKG_CONFIG_PATH.

* guix/build/gnu-build-system.scm (set-paths): Add `PKG_CONFIG_PATH'.

6 years agodistro: Add Lout.
Ludovic Courtès [Sat, 7 Jul 2012 16:14:24 +0000 (18:14 +0200)]
distro: Add Lout.

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

6 years agobuild-system/gnu: Add `tests?' parameter.
Ludovic Courtès [Sat, 7 Jul 2012 16:12:20 +0000 (18:12 +0200)]
build-system/gnu: Add `tests?' parameter.

* guix/build-system/gnu.scm (gnu-build): Add `tests?' parameter.
  [builder]: Inherit it.

6 years agoutils: Have `substitute' restore the file's permission bits.
Ludovic Courtès [Sat, 7 Jul 2012 16:11:52 +0000 (18:11 +0200)]
utils: Have `substitute' restore the file's permission bits.

* guix/build/utils.scm (substitute): Restore FILE's mode before renaming
  TEMPLATE.

6 years agoutils: Change `substitute' and `substitute*' to work with several regexps.
Ludovic Courtès [Sat, 7 Jul 2012 15:12:04 +0000 (17:12 +0200)]
utils: Change `substitute' and `substitute*' to work with several regexps.

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

6 years agodistro: gawk: Disable parallel tests.
Ludovic Courtès [Sat, 7 Jul 2012 14:51:13 +0000 (16:51 +0200)]
distro: gawk: Disable parallel tests.

* distro/base.scm (gawk): Explicitly disable parallel tests.

6 years agoguix-build: Add `--cores'.
Ludovic Courtès [Sat, 7 Jul 2012 14:50:40 +0000 (16:50 +0200)]
guix-build: Add `--cores'.

* guix-build.in (leave): New macro, formerly in `guix-build'.
  (show-help): Document `--cores'.
  (%options): Add `--cores'.
  (guix-build): Remove `leave' macro from here.  Pass the `cores' option
  value to `set-build-options'.

6 years agobuild-system/gnu: Support parallel builds and tests.
Ludovic Courtès [Sat, 7 Jul 2012 14:49:23 +0000 (16:49 +0200)]
build-system/gnu: Support parallel builds and tests.

* guix/build/gnu-build-system.scm (build): Add `parallel-build?'
  parameter; honor it and $NIX_BUILD_CORES.
  (check): Add `parallel-tests?' parameter; likewise.

* guix/build-system/gnu.scm (gnu-build): Add `parallel-build?' and
  `parallel-tests?' parameters.
  [builder]: Inherit them.

6 years agoutils: Introduce `substitute*', for easier sed-like syntax.
Ludovic Courtès [Sat, 7 Jul 2012 14:25:10 +0000 (16:25 +0200)]
utils: Introduce `substitute*', for easier sed-like syntax.

* guix/build/utils.scm (let-matches, substitute*): New macros.

* distro/base.scm (guile-1.8): Use `substitute*' instead of
  `substitute'.  Remove the #:modules argument.

6 years agodistro: Add GNU Guile 1.8.
Ludovic Courtès [Thu, 5 Jul 2012 22:55:07 +0000 (00:55 +0200)]
distro: Add GNU Guile 1.8.

* distro/base.scm (guile-1.8): New variable.

* distro/guile-1.8-cpp-4.5.patch: New file.
* Makefile.am (nobase_dist_guilemodule_DATA): Add it.

6 years agoutils: Make sure `substitute' writes all its output.
Ludovic Courtès [Thu, 5 Jul 2012 22:51:55 +0000 (00:51 +0200)]
utils: Make sure `substitute' writes all its output.

* guix/build/utils.scm (substitute): Close OUT before renaming it.

6 years agognu-build-system: Dump the values of environment variables.
Ludovic Courtès [Thu, 5 Jul 2012 22:50:07 +0000 (00:50 +0200)]
gnu-build-system: Dump the values of environment variables.

* guix/build/gnu-build-system.scm (set-paths): Dump the value of
  environment variables in the `environment-variables' files, similar to
  what Nixpkgs does.

6 years agopackages: Allow inputs that are local files.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
packages: Allow inputs that are local files.

* guix/packages.scm (package-derivation): Add to the store inputs that
  are local files.

6 years agobuild-system/gnu: Add a `patch' phase.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
build-system/gnu: Add a `patch' phase.

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

6 years agobuild-system/gnu: Make the builder's module list a parameter.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
build-system/gnu: Make the builder's module list a parameter.

* guix/build-system/gnu.scm (gnu-build): Add a `modules' keyword
  parameter; use it.

6 years agoAdd builder-side utilities for phases, stream editing, & co.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
Add builder-side utilities for phases, stream editing, & co.

* guix/build/utils.scm (with-directory-excursion): New macro.
  (alist-cons-before, alist-cons-after, alist-replace): New procedures.
  (substitute): New procedure.

* tests/build-utils.scm: New file.

* Makefile.am (TESTS): Add `tests/build-utils.scm'.

6 years agopackages: Add a `self-native-input?' field.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
packages: Add a `self-native-input?' field.

* guix/packages.scm (<package>)[self-native-input?]: New field.
  (package-derivation): Update/fix pattern.

6 years agoRename <package-source> to <origin>; use the `letrec*' behavior in packages.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
Rename <package-source> to <origin>; use the `letrec*' behavior in packages.

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

6 years agodefine-record-type*: Add `letrec*' behavior.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
define-record-type*: Add `letrec*' behavior.

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

6 years agoAdd a `base32' macro, for convenience.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
Add a `base32' macro, for convenience.

* guix/packages.scm (base32): New macro.

* distro/base.scm (libsigsegv, gawk, hello): Use it.

6 years agopackages: Allow the `arguments' field to be a procedure.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
packages: Allow the `arguments' field to be a procedure.

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

6 years agognu-build-system: Improve the `configure' and `check' phases.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
gnu-build-system: Improve the `configure' and `check' phases.

* guix/build/gnu-build-system.scm (configure): Print the final list of
  flags.
  (check): Add `tests?' keyword parameter.

6 years agognu-build-system: Print the `configure' flags.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
gnu-build-system: Print the `configure' flags.

* guix/build/gnu-build-system.scm (configure): Print CONFIGURE-FLAGS.

6 years agoMake `define-record-type*' error messages more informative.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
Make `define-record-type*' error messages more informative.

* guix/utils.scm (define-record-type*): In case of missing or extra
  field initializers, raise a descriptive `syntax-error'.

6 years agodistro: libsigsegv: Use multiple outputs.
Ludovic Courtès [Sun, 1 Jul 2012 23:34:36 +0000 (01:34 +0200)]
distro: libsigsegv: Use multiple outputs.

* distro/base.scm (libsigsegv)[outputs]: New field
  (gawk)[arguments]: Clear.
  [inputs]: Add the "lib" output of LIBSIGSEGV.

6 years agoguix-build: Display multiple outputs when needed.
Ludovic Courtès [Sun, 1 Jul 2012 23:24:40 +0000 (01:24 +0200)]
guix-build: Display multiple outputs when needed.

* guix-build.in (guix-build): Display multiple outputs when there's more
  than one.

6 years agoderivation: Coalesce multiple occurrences of the same input.
Ludovic Courtès [Sun, 1 Jul 2012 23:23:39 +0000 (01:23 +0200)]
derivation: Coalesce multiple occurrences of the same input.

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

6 years agobuild: Don't auto-compile tests.
Ludovic Courtès [Sun, 1 Jul 2012 23:03:37 +0000 (01:03 +0200)]
build: Don't auto-compile tests.

* Makefile.am (TESTS_ENVIRONMENT): Add `--no-auto-compile'.

6 years agognu-build-system: Fix "libdir" and "includedir" for multiple-output drvs.
Ludovic Courtès [Sun, 1 Jul 2012 23:03:10 +0000 (01:03 +0200)]
gnu-build-system: Fix "libdir" and "includedir" for multiple-output drvs.

* guix/build/gnu-build-system.scm (configure): Change `--libdir' and
  `--includedir' to LIBDIR + "/lib" and INCLUDEDIR + "/include",
  respectively.

6 years agoUpgrade Nix worker protocol.
Ludovic Courtès [Sun, 1 Jul 2012 22:45:23 +0000 (00:45 +0200)]
Upgrade Nix worker protocol.

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.

6 years agoderivation: Move sorting code to `write-derivation'.
Ludovic Courtès [Sun, 1 Jul 2012 20:55:49 +0000 (22:55 +0200)]
derivation: Move sorting code to `write-derivation'.

* guix/derivations.scm (write-derivation): Sorte OUTPUTS, INPUTS,
  SOURCES, and ENV-VARS alphabetically.
  (derivation-hash): Leave INPUTS, SOURCES, and OUTPUTS unsorted.
  (derivation)[env-vars-with-empty-outputs]: Leave ENV-VARS unsorted.

6 years agobuild: Use `AM_GNU_GETTEXT_VERSION'.
Ludovic Courtès [Sun, 1 Jul 2012 20:01:56 +0000 (22:01 +0200)]
build: Use `AM_GNU_GETTEXT_VERSION'.

* configure.ac: Add `AM_GNU_GETTEXT_VERSION'.  Suggested by
  Antono Vasiljev.

6 years agoFix `derivation-hash' for outputs not sorted alphabetically.
Ludovic Courtès [Sun, 1 Jul 2012 13:37:58 +0000 (15:37 +0200)]
Fix `derivation-hash' for outputs not sorted alphabetically.

* guix/derivations.scm (derivation-hash): Reorder OUTPUTS.
* tests/derivations.scm ("multiple-output derivation, non-alphabetic
  order"): New test.

6 years agoAdd `propagated-inputs' and `properties' to <package>.
Ludovic Courtès [Sun, 1 Jul 2012 15:32:03 +0000 (17:32 +0200)]
Add `propagated-inputs' and `properties' to <package>.

* guix/packages.scm (<package>)[propagated-inputs, properties]: New
  fields.
  (package-derivation): Update `match' clause.

6 years agoUpdate list of dependencies.
Ludovic Courtès [Sun, 1 Jul 2012 13:11:14 +0000 (15:11 +0200)]
Update list of dependencies.

* README: Require libgcrypt or libchop.

6 years agobuild: Build (guix utils) first.
Ludovic Courtès [Sun, 1 Jul 2012 13:10:50 +0000 (15:10 +0200)]
build: Build (guix utils) first.

* Makefile.am (MODULES): Move `guix/utils.scm' first.

6 years agobuild: Capitalize the package name.
Ludovic Courtès [Sat, 30 Jun 2012 22:58:32 +0000 (00:58 +0200)]
build: Capitalize the package name.

* configure.ac: Use "Guix", not "guix", as the package name.