Commit Graph

302 Commits (cf53ecf514301d3ffdfc33dea057b057ffb132d6)

Author SHA1 Message Date
Ludovic Courtès 3441e16497 ui: Factorize bug-report information in `--help'.
* guix/config.scm.in (%guix-home-page-url): New variable.
* guix/ui.scm (show-bug-report-information): New procedure.
* guix-build.in (show-help): Use it.
* guix-download.in (show-help): Likewise.
* guix-import.in (show-help): Likewise.
* guix-package.in (show-help): Likewise.
2013-01-05 15:55:47 +01:00
Ludovic Courtès 93b0357575 utils: Use binary I/O primitives for `remove-store-references'.
* guix/build/utils.scm (fold-port-matches)[get-char]: New procedure.
  (remove-store-references): Use `put-u8' and `put-bytevector'.
2013-01-01 23:12:34 +01:00
Ludovic Courtès 4d058c6792 build-system/gnu: Add `static-package'.
* distro/packages/make-bootstrap.scm (static-package): Move to...
* guix/build-system/gnu.scm (static-package): ... here.  New procedure.
2013-01-01 16:55:34 +01:00
Ludovic Courtès b2adb3ae04 build-system/gnu: Add support for the "bin" output.
* guix/build/gnu-build-system.scm (configure): Add support for "bin"
  output.
2013-01-01 16:52:27 +01:00
Ludovic Courtès bc5bf85fa2 utils: Restore the mtime/atime of patched files.
* guix/build/utils.scm (set-file-time): New procedure.
  (patch-shebang): New `keep-mtime?' parameter; call `set-file-time'
  when it's true.
  (patch-makefile-SHELL): Likewise.
2012-12-31 01:17:43 +01:00
Andreas Enge 6253961de2 build-system/gnu: enable test-target during the check phase
* guix/build-system/gnu.scm: add variable test-target
2012-12-30 22:37:28 +01:00
Ludovic Courtès c089511288 build-system/gnu: Patch shebangs in all the source; patch SHELL in makefiles.
* guix/build/utils.scm (call-with-ascii-input-file): New procedure.
  (patch-shebang): Use it.
  (patch-makefile-SHELL): New procedure.
* guix/build/gnu-build-system.scm (patch-source-shebangs): Patch all the
  files, not just executables; remove `po/Makefile.in.in' patching.
  (patch-generated-files): Rename to...
  (patch-generated-file-shebangs): ... this.  Patch executables and
  makefiles.
  (%standard-phases): Adjust accordingly.

* distro/packages/autotools.scm (libtool): Remove call to `patch-shebang'.
* distro/packages/base.scm (gcc-4.7): Likewise.
  (guile-final): Remove hack to skip `test-command-line-encoding2'.
* distro/packages/bash.scm (bash): Remove `pre-configure-phase'.
* distro/packages/readline.scm (readline): Likewise.
* distro/packages/ncurses.scm (ncurses): Remove `pre-install-phase'.
2012-12-21 22:31:25 +01:00
Ludovic Courtès eca63d3df8 build-system/gnu: Patch shebangs after `configure'.
* guix/build/gnu-build-system.scm (patch-generated-files): New
  procedure.
  (%standard-phases): Add it after `configure'.
2012-12-20 23:06:34 +01:00
Ludovic Courtès 4c377e861b build-system/gnu: Report the execution time of each phase.
* guix/build/gnu-build-system.scm (gnu-build): Report the success or
  failure of each phase and its execution time.
2012-12-20 22:31:08 +01:00
Ludovic Courtès a18b4d085b utils: Add a `progress' parameter to `dump-port'.
* guix/build/utils.scm (dump-port): Add a `progress' keyword parameter.
  Call it after each transfer.
2012-12-20 01:38:56 +01:00
Ludovic Courtès c3ee7448c9 build-system/gnu: Change the order of `patch-source-shebangs' and `patch'.
* guix/build/gnu-build-system.scm (patch-source-shebangs): Add a newline
  after the "SHELL =" line in po/Makefile.in.in.
  (%standard-phases): Move `patch-source-shebangs' after `patch'.
2012-12-19 00:48:20 +01:00
Ludovic Courtès c43e006164 download: Remove unreachable SourceForge mirror.
* guix/download.scm (%mirrors)[sourceforge]: Remove kent.dl.*, which is
  unreachable.
2012-12-17 00:18:15 +01:00
Ludovic Courtès 3c738d6bd8 download: Correctly detect "No route to host" conditions.
* guix/build/download.scm (open-connection-for-uri): Delete addrinfos
  with the same address.  Always open SOCK_STREAM/IPPROTO_IP sockets.
  Fix the error handler's condition to determine what to do.
  Reported by Nikita Karetnikov <nikita.karetnikov@gmail.com> at
  <http://lists.gnu.org/archive/html/bug-guix/2012-12/msg00150.html>.
2012-12-17 00:14:30 +01:00
Ludovic Courtès d008415219 build-system/gnu: Patch shebangs in executable source files.
This allows many packages to build in a chroot that lacks /bin and
thus /bin/sh.

* guix/build/gnu-build-system.scm (patch-source-shebangs): New
  procedure.
  (%standard-phases): Add it.
* guix/build/utils.scm (executable-file?): New procedure.
* distro/packages/perl.scm (perl): Don't use /bin/sh to run `Configure'.
2012-12-15 16:35:26 +01:00
Ludovic Courtès c1c94acf32 build-system/gnu: Make the error port line-buffered.
* guix/build/gnu-build-system.scm (gnu-build): Make the error port
  line-buffered.
2012-12-15 16:01:52 +01:00
Ludovic Courtès 74baf333bf utils: Make the buffer size of `dump-port' a parameter.
* guix/build/utils.scm (dump-port): Make `buffer-size' a keyword
  parameter.
2012-12-15 15:54:29 +01:00
Ludovic Courtès a784c3077e Merge branch 'master' into core-updates
Conflicts:
	distro/packages/multiprecision.scm
2012-12-15 15:28:50 +01:00
Ludovic Courtès b3a53fb361 download: Work around (web client) bug <http://bugs.gnu.org/13095>.
* guix/build/download.scm: Annihilate `shutdown' in (web client).
2012-12-14 18:07:10 +01:00
Ludovic Courtès 7f4f06513a build: Fix default value of `%state-directory'.
* guix/config.scm.in (%state-directory): Append `/nix'.
  Reported by Andreas Enge <andreas@enge.fr>.
2012-12-13 23:53:37 +01:00
Ludovic Courtès 9d1d434cd0 build-system/gnu: Avoid using /bin/sh.
* guix/build/gnu-build-system.scm (configure): Add `inputs' keyword
  parameter.  Take Bash from there, falling back to /bin/sh.  Set
  `CONFIG_SHELL' and `SHELL' to that Bash.  Run "bash ./configure"
  instead of just "./configure".
* distro/packages/bootstrap.scm (%bootstrap-inputs): Add "bash".
* distro/packages/base.scm (gcc-boot0-wrapped): Use "bash" from
  %BOOT1-INPUTS instead of /bin/sh.
2012-12-13 23:38:32 +01:00
Ludovic Courtès 1e9824513c Merge branch 'nix-integration'
Conflicts:
	tests/guix-package.sh
2012-12-13 22:14:25 +01:00
Nikita Karetnikov f15b31c562 licenses: Add 'bsd-style', 'expat', 'gpl1', 'gpl1+', 'lgpl2.0', and 'lgpl2.0+'.
* guix/licenses.scm (bsd-style, expat, gpl1, gpl1+)
  (lgpl2.0, lgpl2.0+): New variables.
2012-12-12 14:40:11 +01:00
Ludovic Courtès a09ec3a5af Have `%nixpkgs-directory' default to #f when $NIXPKGS is the empty string.
* guix/utils.scm (%nixpkgs-directory): Set to #f when the `NIXPKGS'
  environment variable is set but empty.  Reported by
  Andreas Enge <andreas@enge.fr>.
2012-12-10 22:53:28 +01:00
Ludovic Courtès 200dc93761 derivations: Distinguish direct store paths from files within a store path.
* guix/derivations.scm (derivation)[direct-store-path?]: New procedure.
  Use it to determine which inputs must be added to the store.
2012-12-10 00:44:17 +01:00
Ludovic Courtès 4d152bf1d9 Merge branch 'master' into nix-integration
Conflicts:
	guix/store.scm
2012-12-09 23:54:37 +01:00
Ludovic Courtès 3259877d35 store: Add GC-related operations.
* guix/store.scm (gc-action): New enumerate type.
  (read-long-long, read-string-list, write-store-path,
  write-store-path-list, read-store-path-list): New procedures.
  (write-arg): Add support for `store-path' and `store-path-list'.
  (read-arg): Add support for `store-path-list'.
  (define-operation): Add support for multiple-value returns.
  (run-gc, live-paths, dead-paths, collect-garbage, delete-paths): New
  procedures.
  (%long-long-max): New macro.
* tests/store.scm: New file.
* Makefile.am (TESTS): Add it.
2012-12-09 23:52:59 +01:00
Ludovic Courtès d3648e0118 store: Add `add-temp-root'.
* guix/store.scm (add-temp-root): New procedure.
2012-12-09 23:50:17 +01:00
Nikita Karetnikov 838d78e3e0 Add (guix licenses).
* guix/licenses.scm: New file.
* Makefile.am (MODULES): Add it.
2012-12-08 19:17:02 +01:00
Ludovic Courtès a4eabecd11 download: Fix the primary Savannah URL.
* guix/download.scm (%mirrors)[savannah]: Use
  "http://download.savannah.gnu.org/releases/" as the primary URL.
2012-12-07 22:32:03 +01:00
Ludovic Courtès d8eea3d2bc build: Capture configure-time settings in (guix config).
* configure.ac: Compute and substitute `guix_localstatedir'.
* m4/guix.m4: Substitute `guix_system'.
* guix/config.scm.in (%store-directory, %store-directory, %system): New
  variables.
* guix/store.scm (%nix-state-dir): Remove.
  (%default-socket-path): Use %STATE-DIRECTORY as the default.
  (%store-prefix): Use %STORE-DIRECTORY as the default.
* guix/utils.scm (%current-system): Default to %SYSTEM.
2012-12-06 00:07:17 +01:00
Nikita Karetnikov 22189ed117 Add (guix gnu-maintenance).
* guix/gnu-maintenance.scm: New file.
* Makefile.am (MODULES): Add it.
2012-12-05 14:56:25 +01:00
Ludovic Courtès cd3ded4301 store: Honor $NIX_STORE_DIR and $NIX_STATE_DIR.
* guix/store.scm (%nix-state-dir): Honor $NIX_STATE_DIR.
  (%store-prefix): Honor $NIX_STORE_DIR.
2012-12-04 23:48:21 +01:00
Ludovic Courtès 860a6f1ae0 derivations: Fix erroneous call to `add-to-store' for local files as input.
* guix/derivations.scm (derivation)[inputs]: Fix typo in call to
  `add-to-store'.
* tests/derivations.scm ("derivation with local file as input"): New test.
* tests/packages.scm ("trivial with local file as input"): New test.
2012-12-04 23:46:50 +01:00
Ludovic Courtès b40b259f12 download: Add kernel.org mirrors.
* guix/download.scm (%mirrors): Add `kernel.org' mirrors.
2012-11-27 21:55:53 +01:00
Ludovic Courtès 480943dd46 download: Keep only one slash when concatenating URIs.
* guix/build/download.scm (url-fetch)[uri-vicinity]: New procedure.
  [maybe-expand-mirrors]: Use it.
2012-11-27 21:33:54 +01:00
Ludovic Courtès 52bda18abf packages: Add missing export.
* guix/packages.scm: Export `package-home-page'.
2012-11-25 16:55:35 +01:00
Ludovic Courtès 64fc89b6ec guix-package: Add `--list-available'.
* guix-package.in (show-help, %options): Add `--list-available'.
  (guix-package)[process-query]: Add support for `--list-available'.
* doc/guix.texi (Invoking guix-package): Document it.
* tests/guix-package.sh: Add test.

* guix/ui.scm (location->string): New procedure.
* guix/utils.scm: Export <location>.
2012-11-19 23:04:38 +01:00
Ludovic Courtès ec4d308a9e guix-download: Use code from (guix build download).
* guix-download.in (http-fetch, ftp-fetch): Remove.
  (fetch-and-store): Replace `uri' parameter with `name', for the output
  file name.  Redirect the output of `fetch' to the error port.
  (guix-download): Call `url-fetch' for all URI schemes except `file'.
  Handle PATH equal to #f.
* guix/download.scm: Export `%mirrors'.
* tests/guix-download.sh: Change erroneous URL, because URLs at
  example.com are all valid redirections.
2012-11-13 23:04:21 +01:00
Ludovic Courtès 94d222ad97 download: Add support for mirror:// URLs.
* guix/download.scm (%mirrors): New variable.  Mirror lists taken from
  Nixpkgs.
  (url-fetch): New `mirrors' keyword parameter.
  [builder]: Pass it.

* guix/build/download.scm (url-fetch): New `mirrors' keyword parameter.
  [maybe-expand-mirrors]: New procedure.
  [uri]: Use it.
2012-11-13 00:23:43 +01:00
Ludovic Courtès 270246defe download: Follow HTTP redirections.
* guix/build/download.scm (http-fetch): Follow the redirection when CODE
  is 302.
2012-11-13 00:23:43 +01:00
Ludovic Courtès 87f5d36630 Remove (guix http) and (guix ftp).
* guix/ftp.scm, guix/http.scm, guix/build/ftp.scm, guix/build/http.scm:
  Remove.
* Makefile.am (MODULES): Likewise.
* tests/builders.scm, distro/packages/base.scm,
  distro/packages/bash.scm, distro/packages/bdw-gc.scm,
  distro/packages/compression.scm, distro/packages/gawk.scm,
  distro/packages/gnupg.scm, distro/packages/gperf.scm,
  distro/packages/guile.scm, distro/packages/libffi.scm,
  distro/packages/libsigsegv.scm, distro/packages/libtool.scm,
  distro/packages/libunistring.scm, distro/packages/lout.scm,
  distro/packages/m4.scm, distro/packages/multiprecision.scm,
  distro/packages/ncurses.scm, distro/packages/perl.scm,
  distro/packages/pkg-config.scm, distro/packages/pth.scm,
  distro/packages/readline.scm, distro/packages/recutils.scm: Use
  `url-fetch' instead of `http-fetch' and `ftp-fetch'.
* distro/packages/bootstrap.scm: Likewise
  (bootstrap-origin): Remove references to `http-fetch' and
  `ftp-fetch'.
* guix.scm (%public-modules): Remove `http' and `ftp'; add `download'.
2012-11-13 00:23:39 +01:00
Ludovic Courtès 62cab99c32 Add (guix download) and (guix build download).
* guix/download.scm, guix/build/download.scm: New files.
* Makefile.am (MODULES): Add them.
* tests/builders.scm ("url-fetch"): New test.
* distro/packages/bootstrap.scm (bootstrap-origin): Support
  `url-fetch'.
* guix/snix.scm (snix-derivation->guix-package): Use `url-fetch' instead
  of `http-fetch'.
2012-11-12 23:35:04 +01:00
Ludovic Courtès ddc29a782e Move base32 code to (guix base32).
* guix/utils.scm (bytevector-quintet-ref, bytevector-quintet-ref-right,
  bytevector-quintet-length, bytevector-quintet-fold,
  bytevector-quintet-fold-right, make-bytevector->base32-string,
  %nix-base32-chars, %rfc4648-base32-chars, bytevector->base32-string,
  bytevector->nix-base32-string, 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): Move to...
* guix/base32.scm: ... here.  New file.

* tests/utils.scm (%nix-hash, "bytevector->base32-string",
  "base32-string->bytevector", "nix-base32-string->bytevector", "sha256
  & bytevector->base32-string"): Move to...
* tests/base32.scm: ... here.  New file

* guix-download.in, guix/derivations.scm, guix/packages.scm,
  guix/snix.scm, tests/builders.scm, tests/derivations.scm: Adjust
  accordingly.
* guix.scm (%public-modules): Add `base32'.
2012-11-11 22:33:28 +01:00
Ludovic Courtès cfeb75954a http: Add informative output.
* guix/build/http.scm (http-fetch): Emit message indicating the
  download.
2012-11-09 00:21:18 +01:00
Ludovic Courtès e722af7522 http: Check the HTTP response code, and bail if not 200.
* guix/build/http.scm (http-fetch): Check RESP's code; error out when
  it's not 200.
2012-11-09 00:19:20 +01:00
Ludovic Courtès 7bdd1f0e3c derivations: build-expression->derivation: Builder only refers to sources.
* guix/derivations.scm (build-expression->derivation)[source-path]: New
  procedure.
  [builder]: Pass only sources as references.  This fixes a bug whereby
  changing a fixed-output drv referred to by a builder would cause the
  builder's hash to change, thereby leading to a full rebuild.
* tests/derivations.scm ("build-expression->derivation with a
  fixed-output input"): New test.
2012-11-09 00:07:10 +01:00
Ludovic Courtès c4c7406b90 store: Document `add-to-store' hack for `fixed?'.
* guix/store.scm (add-to-store): Document that `fixed?' must be #t.
2012-11-08 00:26:13 +01:00
Ludovic Courtès 53dcd5eea1 build-system/gnu: Add `static-libgcc-package' & supporting procedure.
* guix/build-system/gnu.scm (package-with-extra-configure-variable,
  static-libgcc-package): New procedures.
2012-11-05 23:51:09 +01:00
Ludovic Courtès 0af2c24ef7 utils: Add `default-keyword-arguments' and `substitute-keyword-arguments'.
* distro/packages/base.scm (default-keyword-arguments,
  substitute-keyword-arguments): Move to...
* guix/utils.scm: ... here.
2012-11-05 23:50:57 +01:00
Ludovic Courtès 10226c05b1 Add (guix snix) and the `guix-import' command.
* guix/snix.scm, tests/snix.scm, guix-import.in: New files.
* configure.ac: Output `guix-import' and make it executable.
* Makefile.am (bin_SCRIPTS): Add `guix-import'.
  (MODULES): Add `guix/snix.scm'.
  (TESTS): Add `tests/snix.scm'.
2012-11-04 19:38:31 +01:00
Ludovic Courtès d45122f537 packages: `description' → `synopsis', `long-description' → `description'.
* guix/packages.scm (<package>): Rename `description' to `synopsis', and
  `long-description' to `description'.
* tests/packages.scm, distro/packages/base.scm,
  distro/packages/databases.scm, distro/packages/guile.scm,
  distro/packages/typesetting.scm:  Update accordingly.
* po/Makevars (XGETTEXT_OPTIONS): Update `--keyword' flags accordingly.
2012-11-04 13:48:35 +01:00
Ludovic Courtès 9b48fb88ca utils: Add `package-name->name+version'.
* guix/utils.scm (package-name->name+version): New procedure.
* guix-package.in (guix-package)[find-package]: Use it.
* tests/utils.scm ("package-name->name+version"): New test.
2012-11-04 01:29:18 +01:00
Ludovic Courtès d388c2c435 build: Require GNU libgcrypt.
* guix/utils.scm (sha256): Remove Coreutils- and libchop-based
  implementations.
* README: Update accordingly.

* m4/guix.m4: New file.
* configure.ac: Use `GUIX_ASSERT_LIBGCRYPT_USABLE'.  Set and substitute
  `LIBGCRYPT_PREFIX'.
* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Pass
  `--with-libgcrypt-prefix=$(LIBGCRYPT_PREFIX)'.
2012-11-03 21:49:54 +01:00
Ludovic Courtès cdd5d6f95f ui: Factorize `--version'.
* guix/ui.scm (show-version-and-exit): New procedure.
* guix-build.in (show-version): Remove.
  (%options)["version"]: Use `show-version-and-exit'.
* guix-download.in: Likewise.
* guix-package.in: Likewise.
2012-11-03 21:19:43 +01:00
Ludovic Courtès 00e219d1c9 build: Produce (guix config) instead of using compile-time tricks.
* guix/config.scm.in: New file.
* guix/utils.scm: Use it.
  (%libgcrypt): Remove.
  (%nixpkgs-directory): Don't capture the compile-time $NIXPKGS; use
  %NIXPKGS instead.
  (nixpkgs-derivation): Use %NIX-INSTANTIATE.
* pre-inst-env.in (NIX_INSTANTIATE, NIXPKGS, LIBGCRYPT): Remove.

* configure.ac: Emit `guix/config.scm'.
* Makefile.am (GOBJECTS): Add `guix/config.go'.
  (nobase_nodist_guilemodule_DATA): Add `guix/config.scm'.
2012-11-03 21:11:28 +01:00
Ludovic Courtès e76bdf8b87 build: Clearly mark Nixpkgs as optional.
* configure.ac: Always show the result of checking for Nixpkgs.  Don't
  warn when Nixpkgs is not found.
* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Remove `--with-nixpkgs'
  flag.
* guix/utils.scm (%nixpkgs-directory): Use either the compile-time or
  the run-time `NIXPKGS' environment variable.
* release.nix (jobs.tarball, jobs.build): Remove `--with-nixpkgs'
  configure flag.
* README: Mark Nixpkgs as optional.

* distro/packages/databases.scm, distro/packages/guile.scm,
  distro/packages/typesetting.scm: Change uses of `nixpkgs-derivation*'
  to `nixpkgs-derivation', to avoid failing at compile-time.
2012-11-03 21:11:26 +01:00
Ludovic Courtès e3d741065e store: Add `store-path-package-name'.
* guix/store.scm (store-path-package-name): New procedure.
* tests/utils.scm ("store-path-package-name"): New test.
2012-11-01 01:39:23 +01:00
Ludovic Courtès 07d18f39cc utils: Remove stuff committed by error.
This was wrongfully committed in df1fab58.

* guix/utils.scm (hash-set-proc, hash-ref*, memoizing-lambda): Remove.
2012-11-01 01:35:00 +01:00
Ludovic Courtès 073c34d72f Add (guix ui).
* guix/ui.scm: New file.
* Makefile.am (MODULES): Add it.
* po/POTFILES.in: Add it.

* guix-build.in: Use it.
  (_, N_, leave): Remove.
  (guix-build): Use `with-error-handling' instead of the `guard' form.
* guix-download.in: Use it.
  (_, N_, leave): Remove.
2012-11-01 00:52:44 +01:00
Ludovic Courtès 111111d046 build-system/gnu: Distinguish between imported modules and used modules.
* guix/build-system/gnu.scm (gnu-build): Add the `imported-modules'
  keyword parameter.  Pass it to `build-expression->derivation'.
2012-10-31 17:53:59 +01:00
Ludovic Courtès 34811f02bf guix-build: Add `--root'.
* guix/store.scm (add-indirect-root): New operation.
* guix-build.in (show-help): Document `--root'.
  (%options): Add `--root'.
  (guix-build)[register-root]: New procedure.  Call it when `--root' is
  passed.
2012-10-30 00:20:53 +01:00
Ludovic Courtès c8c88afaa1 Add (guix build union).
* guix/build/union.scm, tests/union.scm: New files.
* Makefile.am (MODULES): Add `guix/build/union.scm'.
  (TESTS): Add `tests/union.scm'.
2012-10-29 22:39:46 +01:00
Ludovic Courtès 0778385802 guix-build: Gracefully handle `&package-input-error' conditions.
* guix/packages.scm: Export `package-error?' and `package-input-error?'.
* guix-build.in (guix-build): Catch `&package-input-error' conditions,
  print a human-readable message, and exit.
2012-10-27 14:56:46 +02:00
Ludovic Courtès 5e6c90121f location: Start column numbers at 1.
* guix/utils.scm (source-properties->location): Use COL + 1.
2012-10-27 14:53:47 +02:00
Ludovic Courtès 20d83444dd utils: Remove special `substitute*' syntax for lists of files.
* guix/build/utils.scm (substitute*): Remove special syntax for
  list-of-files; instead, check whether FILE is `list?' at run time.

* distro/packages/base.scm (gcc-4.7, %binutils-static): Adjust
  accordingly.
2012-10-26 09:07:37 +02:00
Ludovic Courtès fbc93bedff Add a `system' parameter to `nixpkgs-derivation'.
* guix/utils.scm (nixpkgs-derivation): Add a `system' parameter.  Pass
  it in the `nix-instantiate' invocation.
2012-10-25 23:42:06 +02:00
Ludovic Courtès b642e4b853 packages: Pass `system' around.
* guix/packages.scm (package-source-derivation): Add `system'
  parameter.  Pass it to METHOD.
  (package-derivation)[expand-input]: Pass SYSTEM to
  `package-derivation' and `package-source-derivation'.

* distro/packages/base.scm (package-with-bootstrap-guile)[boot]: Pass
  SYSTEM to FETCH.
2012-10-25 23:41:15 +02:00
Ludovic Courtès ae39d1b233 derivations: Make sure `build-expression->derivation' & co. pass `system'.
* guix/derivations.scm (imported-files): Call
  `build-expression->derivation' with SYSTEM, not (%current-system).
  (build-expression->derivation): Pass SYSTEM to `imported-modules' and
  `compiled-modules'.
2012-10-25 23:14:27 +02:00
Ludovic Courtès b272c47433 derivations: Pass the derivation of guile-for-build to `imported-files' & co.
* guix/derivations.scm (%guile-for-build): Initialize to #f.
  (imported-files, imported-modules, compiled-modules): Add `guile'
  keyword parameter.  Pass it down to `build-expression->derivation'.
  (build-expression->derivation)[guile-drv]: New variable.  Pass it as
  the #:guile parameter for `imported-modules' and `compiled-modules'.

* tests/derivations.scm: Set %GUILE-FOR-BUILD to the derivation of
  %BOOTSTRAP-GUILE.
2012-10-25 18:03:48 +02:00
Ludovic Courtès 82058eff59 store: Add `query-path-hash'.
* guix/store.scm (write-arg, read-arg): Add `base16' literal and
  corresponding rule.
  (query-path-hash): New operation.

* tests/derivations.scm ("fixed-output derivation"): Check whether
  `query-path-hash' returns a bytevector.
2012-10-24 23:52:15 +02:00
Ludovic Courtès d90248844b derivations: Compile the #:modules passed to `build-expression->derivation'.
* guix/derivations.scm (imported-files)[parent-dirs]: Move to...
  (parent-directories): ... here.  New procedure.
  (compiled-modules): New procedure.
  (build-expression->derivation): Use it.

* tests/derivations.scm ("build-expression->derivation with modules"):
  New test.
2012-10-24 00:09:25 +02:00
Ludovic Courtès 592ef6c88f packages: Add support for system-dependent inputs.
* guix/packages.scm (package-derivation)[intern]: New procedure.  Pass
  #t as the `recursive?' argument, instead of #f.
  [expand-input]: New procedure, with code formerly in the body.
  Support inputs where the input is a procedure returning a file name or
  an <origin>.
  Use `expand-input' in the body.

* tests/packages.scm ("trivial with system-dependent input"): New test.
2012-10-21 17:52:16 +02:00
Ludovic Courtès d6e8777688 distro: Use the bootstrap Guile for the derivation of sources.
* distro/packages/base.scm (bootstrap-origin,
  package-with-bootstrap-guile): New procedures.
  (gnu-make-boot0, diffutils-boot0, findutils-boot0, binutils-boot0,
  gcc-boot0, linux-libre-headers-boot0, glibc-final, bash-final,
  guile-final): Use `package-with-bootstrap-guile'.
  (gcc-boot0-wrapped): Clear `source'.

* guix/ftp.scm (ftp-fetch): Add a #:guile keyword parameter.  Honor it.
* guix/http.scm (http-fetch): Likewise.
2012-10-18 23:18:38 +02:00
Ludovic Courtès d14ecda913 http/ftp: Tweak to avoid depending on libc's NSS.
* guix/build/http.scm (open-connection-for-uri): New procedure.
  (http-fetch): Use it.  Pass the result as a #:port argument to
  `http-get'.
  Add hack to modify the `set-port-encoding!' binding in (web response).

* guix/ftp-client.scm (ftp-open): Add optional `port' parameter,
  defaulting to 21.  When calling `getaddrinfo', convert PORT to a
  string and pass AI_NUMERICSERV when PORT is a number.
2012-10-18 22:32:23 +02:00
Ludovic Courtès 4c261f4169 utils: Add `find-files'.
* guix/build/utils.scm (find-files): New procedure.
2012-10-17 23:25:25 +02:00
Ludovic Courtès c0746cc9db utils: Add `copy-recursively'; use it.
* guix/build/utils.scm (copy-recursively): New procedure.

* distro/packages/base.scm (%guile-static-stripped): Use it.
2012-10-17 23:25:25 +02:00
Ludovic Courtès 7da95264f1 utils: Add `mkdir-p'; use it.
* guix/build/utils.scm (mkdir-p): New procedure.

* distro/packages/base.scm (gnu-make-boot0, gcc-boot0-wrapped,
  ld-wrapper-boot3, %static-binaries, %guile-static-stripped): Use it.
* distro/packages/typesetting.scm (lout): Likewise.
2012-10-17 23:25:25 +02:00
Ludovic Courtès 7172116ca5 build-system/gnu: Pass the system type to the builder.
* guix/build-system/gnu.scm (gnu-build)[builder]: Pass SYSTEM to
  `gnu-build' as a keyword argument.
2012-10-17 23:25:25 +02:00
Ludovic Courtès 91133c2d71 utils: Add `fold-port-matches' and `remove-store-references'.
* guix/build/utils.scm (fold-port-matches, remove-store-references): New
  procedures.

* tests/build-utils.scm ("fold-port-matches", "fold-port-matches,
  trickier", "fold-port-matches, with unmatched chars"): New tests.
2012-10-16 23:01:01 +02:00
Ludovic Courtès dcd7290654 utils: Add `with-atomic-file-replacement'.
* guix/build/utils.scm (with-atomic-file-replacement): New procedure.
  (substitute): Use it.
2012-10-16 17:31:16 +02:00
Ludovic Courtès df1fab5837 distro: Add a statically-linked, relocatable Guile 2.0 package.
* 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.
2012-10-13 22:36:39 +02:00
Ludovic Courtès 4004f95379 ftp-client: Try all the addresses returned by `getaddrinfo'.
* guix/ftp-client.scm (ftp-open): Upon connection failure, try the other
  addresses returned by `getaddrinfo'.
2012-10-13 21:18:16 +02:00
Ludovic Courtès e4588af969 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.
2012-10-08 22:07:19 +02:00
Ludovic Courtès ead1f1086d packages: Micro-optimize `package-derivation'.
* guix/packages.scm (package-derivation): Move `cache' call before the
  traversal of PACKAGE's inputs.
2012-10-08 21:57:14 +02:00
Ludovic Courtès df7bbd3813 derivations: Set input port to UTF-8 in `read-derivation'.
* guix/derivations.scm (read-derivation): Set DRV-PORT's encoding to
  UTF-8.
2012-10-07 22:28:07 +02:00
Ludovic Courtès 81c7948d9a 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.
2012-10-07 22:22:27 +02:00
Ludovic Courtès 12d5aa0f5a 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.
2012-10-06 01:25:17 +02:00
Ludovic Courtès db1a15314d 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.
2012-10-05 23:21:09 +02:00
Ludovic Courtès 1f455fdca6 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.
2012-09-26 22:00:58 +02:00
Ludovic Courtès 457dd86d66 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'.
2012-09-12 23:47:49 +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 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 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 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 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 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 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 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 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 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 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 8773648e35 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.
2012-08-25 13:12:45 +02:00
Ludovic Courtès 22b5d9c9a5 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.
2012-08-23 23:13:41 +02:00
Ludovic Courtès d36622dc44 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.
2012-08-23 23:09:13 +02:00
Ludovic Courtès 3abaf0c440 Add `close-connection'.
* guix/store.scm (close-connection): New procedure.
2012-08-22 17:25:47 +02:00
Ludovic Courtès fc484f605c 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'.
2012-08-19 23:05:04 +02:00
Ludovic Courtès 525a59d6d3 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.
2012-08-19 23:04:03 +02:00
Ludovic Courtès 437fd80992 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'.
2012-08-19 17:54:54 +02:00
Ludovic Courtès ebe2f31f19 utils: Add `patch-shebang'.
* guix/build/utils.scm (search-path-as-string->list): New procedure.
  (dump-port, patch-shebang): New procedures.
2012-08-19 17:41:30 +02:00
Ludovic Courtès 3a310cc017 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.
2012-08-17 10:41:27 +02:00
Ludovic Courtès 93a0a8b3fd packages: Add all non-derivation paths to the store.
* guix/packages.scm (package-derivation): Add all non-derivation paths
  to the store.
2012-08-16 19:00:49 +02:00
Ludovic Courtès cf56996046 packages: Allow store paths as inputs.
* guix/packages.scm (package-derivation): Allow non-derivation store
  paths as inputs.
2012-08-16 18:48:03 +02:00
Ludovic Courtès b86b00567c 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.
2012-08-14 18:42:46 +02:00
Ludovic Courtès ce5d658c5c Add `nixpkgs-derivation*'; use it in the distro.
* guix/utils.scm (nixpkgs-derivation*): New macro.

* distro/base.scm: Use it instead of `nixpkgs-derivation'.
2012-07-11 17:26:43 +02:00
Ludovic Courtès d44bc84b15 Unset `LD_LIBRARY_PATH' in `build-expression->derivation'.
* guix/derivations.scm (build-expression->derivation)[prolog]: Unset
  `LD_LIBRARY_PATH'.
2012-07-07 22:38:08 +02:00
Ludovic Courtès da62d3e5ae build-system/gnu: Add dependency on GNU Findutils.
* guix/build-system/gnu.scm (%standard-inputs): Add "findutils".
2012-07-07 22:08:35 +02:00
Ludovic Courtès a3d73f59e3 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.
2012-07-07 20:14:31 +02:00
Ludovic Courtès c51e6ea2d8 build-system/gnu: Set $PKG_CONFIG_PATH.
* guix/build/gnu-build-system.scm (set-paths): Add `PKG_CONFIG_PATH'.
2012-07-07 18:40:39 +02:00
Ludovic Courtès c3c7eb4194 build-system/gnu: Add `tests?' parameter.
* guix/build-system/gnu.scm (gnu-build): Add `tests?' parameter.
  [builder]: Inherit it.
2012-07-07 18:12:20 +02:00
Ludovic Courtès d9dbab18e2 utils: Have `substitute' restore the file's permission bits.
* guix/build/utils.scm (substitute): Restore FILE's mode before renaming
  TEMPLATE.
2012-07-07 18:11:52 +02:00
Ludovic Courtès 4fa697e932 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.
2012-07-07 17:12:04 +02:00
Ludovic Courtès febaa88569 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.
2012-07-07 16:49:23 +02:00
Ludovic Courtès 10c87717bd 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.
2012-07-07 16:25:10 +02:00
Ludovic Courtès 8e6ecb1400 utils: Make sure `substitute' writes all its output.
* guix/build/utils.scm (substitute): Close OUT before renaming it.
2012-07-06 00:51:55 +02:00
Ludovic Courtès 1a7d8e2048 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.
2012-07-06 00:50:07 +02:00
Ludovic Courtès e67ac6e668 packages: Allow inputs that are local files.
* guix/packages.scm (package-derivation): Add to the store inputs that
  are local files.
2012-07-05 01:20:05 +02:00
Ludovic Courtès 74cd03b1a0 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.
2012-07-05 01:04:20 +02:00
Ludovic Courtès 3e43c64a74 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.
2012-07-05 00:14:40 +02:00
Ludovic Courtès b0e0d0e99f 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'.
2012-07-05 00:13:30 +02:00
Ludovic Courtès c9d01150c0 packages: Add a `self-native-input?' field.
* guix/packages.scm (<package>)[self-native-input?]: New field.
  (package-derivation): Update/fix pattern.
2012-07-05 00:09:17 +02:00
Ludovic Courtès 90c68be883 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.
2012-07-03 23:50:29 +02:00
Ludovic Courtès 8fd5bd2b69 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.
2012-07-03 21:59:56 +02:00
Ludovic Courtès e4c245f8a5 Add a `base32' macro, for convenience.
* guix/packages.scm (base32): New macro.

* distro/base.scm (libsigsegv, gawk, hello): Use it.
2012-07-02 16:07:26 +02:00
Ludovic Courtès 03671375b6 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.
2012-07-02 15:59:30 +02:00
Ludovic Courtès a1232d0cb8 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.
2012-07-02 15:56:22 +02:00
Ludovic Courtès 18a8dad70c gnu-build-system: Print the `configure' flags.
* guix/build/gnu-build-system.scm (configure): Print CONFIGURE-FLAGS.
2012-07-02 15:40:34 +02:00
Ludovic Courtès 8ef3401f65 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'.
2012-07-02 15:37:30 +02:00
Ludovic Courtès d66ac374e9 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.
2012-07-02 01:35:39 +02:00
Ludovic Courtès 08005c6579 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.
2012-07-02 01:35:39 +02:00