Commit Graph

46769 Commits

Author SHA1 Message Date
Ludovic Courtès a1e4a93693 Update list of dependencies.
* README: Require libgcrypt or libchop.
2012-07-01 15:11:14 +02:00
Ludovic Courtès 73fbb90431 build: Build (guix utils) first.
* Makefile.am (MODULES): Move `guix/utils.scm' first.
2012-07-01 15:10:50 +02:00
Ludovic Courtès 6152632593 build: Capitalize the package name.
* configure.ac: Use "Guix", not "guix", as the package name.
2012-07-01 00:58:32 +02:00
Ludovic Courtès 14a1c3197c Add `guix-build'.
* guix-build.in: New file.

* configure.ac: Emit `guix-build'.  Add `commands-exec'.
* Makefile.am (bin_SCRIPTS): New variable.
* po/POTFILES.in: Add `guix-build.in'.
2012-07-01 00:56:24 +02:00
Ludovic Courtès 9a20830e57 Add `derivation-prerequisites' and `derivation-prerequisites-to-build'.
* 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.
2012-07-01 00:37:03 +02:00
Ludovic Courtès 31ef99a8a5 Add the `valid-path?' RPC.
* guix/store.scm (valid-path?): New procedure.

* tests/builders.scm ("http-fetch", "gnu-build"): Use it.
* tests/derivations.scm ("add-to-store, flat", "add-to-store,
  recursive", "derivation with no inputs", "build derivation with 1
  source", "build derivation with coreutils",
  "build-expression->derivation with expression returning #f"):
  Likewise.
2012-07-01 00:27:27 +02:00
Ludovic Courtès e036c31bc6 Add missing `set-build-options' parameters.
* guix/store.scm (set-build-options)[build-cores, use-substitutes?]: New
  keyword parameters.
  [send]: Change to expect a type, and use `write-arg'.
  Send settings for BUILD-CORES and USE-SUBSTITUTES? when the server
  supports it.
2012-07-01 00:09:47 +02:00
Ludovic Courtès 6b1891b0a1 Add (distro) with a package searching facility.
* Makefile.am (MODULES): Add `distro.scm'.

* distro.scm: New file.
* po/POTFILES.in: Add it.

* tests/packages.scm ("find-packages-by-name", "find-packages-by-name
  with version"): New tests.
2012-06-30 16:37:19 +02:00
Ludovic Courtès 39b9372ca7 Add a libgcrypt-based implementation of `sha256'.
* guix/utils.scm (sha256): Add a libgcrypt-based implementation using
  the FFI.
2012-06-29 22:58:27 +02:00
Ludovic Courtès f68b089361 Gettextize, with GNU Gettext 0.18.1.
* Makefile.am (EXTRA_DIST): Add `build-aux/config.rpath'.
  (SUBDIRS, ACLOCAL_AMFLAGS): New variables.

* configure.ac: Use `AM_GNU_GETTEXT'.  Emit `po/Makefile.in'.

* po/Makevars, po/POTFILES.in: New files.
2012-06-29 22:38:22 +02:00
Ludovic Courtès 64fddd74f0 distro: Add libsigsegv and GNU Awk.
* guix/packages.scm (<package>)[arguments]: Default to '().

* distro/base.scm (libsigsegv, gawk): New packages.
  (hello): Use GAWK instead of (nixpkgs-derivation "gawk").
2012-06-29 00:28:57 +02:00
Ludovic Courtès d26ad5e45b derivation: Remove duplicate inputs.
* guix/derivations.scm (derivation): Remove duplicates from INPUT.
2012-06-29 00:27:32 +02:00
Ludovic Courtès 5791d3b696 build-system/gnu: Add GNU Awk to the standard inputs.
* guix/build-system/gnu.scm (%standard-inputs): Add GNU Awk.
2012-06-28 23:46:00 +02:00
Ludovic Courtès 45753b6552 packages: Add a `home-page' field.
* guix/packages.scm (<package>)[home-page]: New field.

* distro/base.scm (hello)[home-page]: Initialize.
2012-06-28 23:44:43 +02:00
Ludovic Courtès 35f3c5f5ad Track the source location of packages.
* guix/packages.scm (<location>): New record type.
  (location, source-properties->location): New procedures.
  (<package>)[location]: New field.

* tests/packages.scm ("GNU Hello"): Test `package-location'.
2012-06-28 23:15:24 +02:00
Ludovic Courtès dba6b34bdd Add a sha256 fallback that uses Coreutils instead of libchop.
* guix/utils.scm (compile-time-value): Move to the top.
  (sha256): Add an implementation that uses Coreutils, for when libchop
  is unavailable.
2012-06-28 22:57:40 +02:00
Ludovic Courtès 900f726734 Introduce `compile-time-value' and use it.
* guix/utils.scm (compile-time-value): New macro.
  (%nixpkgs-directory): Use it.

* guix/build-system/gnu.scm (%standard-inputs): Likewise.
2012-06-28 22:38:09 +02:00
Ludovic Courtès e3ce5d709f Add a declarative packaging layer.
* 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'.
2012-06-28 01:24:34 +02:00
Ludovic Courtès e1e8874ee8 build-system/gnu: Have `configure-flags' and `make-flags' evaluated.
* guix/build-system/gnu.scm (gnu-build): Double-quote the default value
  of MAKE-FLAGS and CONFIGURE-FLAGS.  Don't quote them in BUILDER.
2012-06-28 01:18:15 +02:00
Ludovic Courtès 04a0b857d8 build: Define $NIXPKGS when compiling.
* Makefile.am (.scm.go): Define $NIXPKGS.
2012-06-28 00:53:13 +02:00
Ludovic Courtès 208f7cd155 Abstract build systems.
* Makefile.am (MODULES): Add `guix/build-system.scm' and
  `guix/build-system/gnu.scm'.  Remove `guix/gnu-build-system.scm'.

* guix/build-system.scm: New file.
* guix/gnu-build-system.scm: Rename to...
* guix/build-system/gnu.scm: ... this.
  (gnu-build-system): New variable.

* tests/builders.scm: Adjust `use-module' clauses.
  ("gnu-build-system"): New test.
2012-06-27 23:58:07 +02:00
Ludovic Courtès 72d869634b Add `define-record-type*'.
* guix/utils.scm (define-record-type*): New macro.

* tests/utils.scm ("define-record-type*"): New test.
2012-06-27 23:40:12 +02:00
Ludovic Courtès 0d56a551bf build-expression->derivation: Move module forms at the top-level.
* guix/derivations.scm (build-expression->derivation)[module-form?]: New
  procedure.
  [prologue]: Add any form of EXP that matches MODULE-FORM?.
  [builder]: Remove any MODULE-FORM? from EXP.
2012-06-17 16:43:40 +02:00
Ludovic Courtès 5dcfdcaa79 gnu-build-system: Structure as a customizable sequence of phases.
* guix/build/gnu-build-system.scm (set-paths, build, check, install):
  New procedures.
  (unpack): Make `source' a keyword arg; add `#:allow-other-keys'.
  (configure): Likewise.
  (%standard-phases): New variable.
  (gnu-build): Make `source', `outputs', and `inputs' keyword arguments;
  add `phases' keyword argument; #:allow-other-keys; add rest arguments
  `args'.  Invoke each of PHASES in order within `every'.

* guix/gnu-build-system.scm (gnu-build): Add `make-flags' and `phases'
  keyword arguments.  Update builder's `gnu-build' call to match the new
  convention.
2012-06-16 17:02:19 +02:00
Ludovic Courtès 3ab892fffe gnu-build-system: Add GNU Diffutils and GNU Path to the standard inputs.
* guix/gnu-build-system.scm (%standard-inputs): Add Diffutils and Patch.
2012-06-16 16:48:14 +02:00
Ludovic Courtès db393b333f build-expression->derivation: Have the build fail when EXP returns #f.
* guix/derivations.scm (build-expression->derivation)[builder]: Pass the
  result of EXP to `exit'.

* tests/derivations.scm ("build-expression->derivation with expression
  returning #f"): New test.
2012-06-16 16:46:29 +02:00
Ludovic Courtès 9f55cf8d56 Remove leftover debugging expressions.
* guix/build/utils.scm (directory-exists?): Remove leftover debugging
  expressions.
2012-06-16 16:16:16 +02:00
Ludovic Courtès dcee50c114 store: Wait for the server to be done sending output.
* guix/store.scm (current-build-output-port): New variable.
  (process-stderr): Add docstring.  Always return #f, except upon
  %STDERR-LAST.  Upon %STDERR-NEXT, write to
  `current-build-output-port', not `current-error-port'.
  (set-build-options): Loop until `process-stderr' returns true.
  (define-operation): Likewise.
  (build-derivations): Update docstring to mention that it's
  synchronous.
2012-06-16 16:13:12 +02:00
Ludovic Courtès 73d9659697 build: Be cross-compilation-ready.
* Makefile.am (.scm.go): Pass `--target=$(host)'.

* configure.ac: Use `AC_CANONICAL_HOST'.
2012-06-15 10:11:29 +02:00
Ludovic Courtès 48e8333d91 build: Provide the right include path when building modules.
* Makefile.am (.scm.go): Add missing `-L $(top_srcdir)'.
2012-06-15 10:04:38 +02:00
Ludovic Courtès 1273d44ac7 Build (guix) last.
* Makefile.am (MODULES): Move `guix.scm' last.
2012-06-15 10:03:08 +02:00
Ludovic Courtès af51c820b1 Add a build system.
* configure.ac, Makefile.am: New files.
2012-06-13 18:01:25 +02:00
Ludovic Courtès 2acb2cb6d0 Change `build-expression->derivation' to support sub-derivation inputs.
* guix/derivations.scm (build-expression->derivation): Change to expect
  INPUTS to have the form (NAME DRV-PATH SUB-DRV) or (NAME DRV-PATH),
  instead of (NAME . DRV-PATH).  Update callers accordingly.

* guix/gnu-build-system.scm, tests/builders.scm, tests/derivations.scm:
  Update accordingly.
2012-06-13 17:21:27 +02:00
Ludovic Courtès c36db98c8e Add supporting tools for the GNU Build System.
* guix/derivations.scm (build-expression->derivation): Add all of INPUTS
  as inputs to the final derivation.

* guix/build/gnu-build-system.scm, guix/build/utils.scm,
  guix/gnu-build-system.scm: New files.

* tests/builders.scm ("gnu-build"): New test.
2012-06-13 17:03:34 +02:00
Ludovic Courtès bcdd83ec69 Fix the order of the derivation's sources in `derivation-hash'.
* guix/derivations.scm (derivation-hash): Sort SOURCES alphabetically as
  well.
2012-06-13 16:45:54 +02:00
Ludovic Courtès 224f7ad6a3 Fix `imported-files' for files with a common prefix.
* guix/derivations.scm (imported-files)[builder]: For TAIL, check
  whether it exists before (mkdir TAIL).

* tests/derivations.scm ("imported-files"): Add file with a common
  prefix.
2012-06-12 23:30:00 +02:00
Ludovic Courtès d1b1c4249a Add `add-to-store' test for flat files.
* tests/derivations.scm ("add-to-store, flat"): New test.
2012-06-12 00:19:04 +02:00
Ludovic Courtès 3eb982377e Augment `build-expression->derivation' with #:modules; add `http-fetch'.
* guix/derivations.scm (imported-modules): New procedure.
  (build-expression->derivation): New keyword argument `modules'.
  Use `imported-modules' when MODULES is non-empty, and pass it with
  `-L' to GUILE.

* guix/build/http.scm, guix/http.scm, tests/builders.scm: New files.
2012-06-12 00:18:14 +02:00
Ludovic Courtès 99634e3ff4 Add `imported-files'.
* guix/derivations.scm (imported-files): New procedure.
  (build-expression->derivation): Correctly handle inputs that are
  sources and not derivation paths.

* tests/derivations.scm ("imported-files"): New test.
2012-06-11 23:12:55 +02:00
Ludovic Courtès 0e383c76ce Fix the `build-expression->derivation' fixed-output test.
* tests/derivations.scm ("build-expression->derivation"): Fix the
  builder to actually pass a bytevector to `put-bytevector'.
2012-06-11 23:02:39 +02:00
Ludovic Courtès 9809055707 Add a `%current-system' fluid.
* guix/utils.scm (gnu-triplet->nix-system): New procedure.
  (%current-system): New variable.

* tests/utils.scm ("gnu-triplet->nix-system"): New test.

* tests/derivations.scm (%current-system): Remove.  Update users to
  use (%current-system) instead.
2012-06-11 21:50:17 +02:00
Ludovic Courtès b37eb5ede6 Add `add-to-store' with recursive directory storage.
* guix/store.scm (write-file): Implement directory recursive dump.
  (add-to-store): Fix the parameter list.

* tests/derivations.scm (directory-contents): New procedure.
  ("add-to-store, recursive"): New test.
2012-06-10 22:43:02 +02:00
Ludovic Courtès 81095052a8 tests: Don't hard-code the system type.
* tests/derivations.scm (%current-system): New variable.  Replace
  occurrences of "x86_64-linux" by %CURRENT-SYSTEM.
2012-06-10 15:34:46 +02:00
Ludovic Courtès 9bc07f4df0 Add multiple-output support to `build-expression->derivation'.
* guix/derivations.scm (build-expression->derivation): Add `outputs'
  keyword parameter; pass it to `derivation'.  Define `%outputs' in the
  prologue.

* tests/derivations.scm ("build-expression->derivation with two
  outputs"): New test.
2012-06-09 23:16:55 +02:00
Ludovic Courtès 7946c4e710 Add `derivation' test for multiple-output derivations.
* tests/derivations.scm ("multiple-output derivation"): New test.
2012-06-09 21:52:31 +02:00
Ludovic Courtès af7f9e5f13 Sort environment variables alphabetically in `derivation'.
* guix/derivations.scm (derivation)[env-vars-with-empty-outputs]: Sort
  the result alphabetically.

* tests/derivations.scm ("build derivation with 1 source"): Add
  environment variables.
2012-06-09 21:50:30 +02:00
Ludovic Courtès 26b969dee0 Add support for fixed-output derivations in `build-expression->derivation'.
* guix/derivations.scm (build-expression->derivation): Pass HASH and
  HASH-ALGO to `derivation'.

* tests/derivations.scm ("build-expression->derivation for fixed-output
  derivation"): New test.
2012-06-09 18:52:16 +02:00
Ludovic Courtès 749c656755 Add support for fixed-output derivations.
* guix/derivations.scm (read-derivation)[outputs->alist]: For
  fixed-outputs, convert HASH with `base16-string->bytevector'.
  (write-derivation): Likewise, convert HASH-ALGO to a string and HASH
  to a base16 string.
  (derivation-hash): Expect HASH to be a bytevector, not a string;
  convert HASH with `bytevector->base16-string'.

* tests/derivations.scm ("fixed-output derivation"): New test.
2012-06-09 18:49:19 +02:00
Ludovic Courtès 6d800a80ea Add `base16-string->bytevector'.
* guix/utils.scm (base16-string->bytevector): New procedure.

* tests/utils.scm ("bytevector->base16-string->bytevector"): New test.
2012-06-09 16:34:18 +02:00
Ludovic Courtès c8369cacce Add `base32-string->bytevector' and `nix-base32-string->bytevector'.
* guix/utils.scm (bytevector-quintet-set!,
  bytevector-quintet-set-right!, base32-string-unfold,
  base32-string-unfold-right, make-base32-string->bytevector,
  base32-string->bytevector, nix-base32-string->bytevector): New
  procedures.

* tests/utils.scm ("base32-string->bytevector",
  "nix-base32-string->bytevector"): New tests.
2012-06-09 15:25:51 +02:00