Commit Graph

29 Commits

Author SHA1 Message Date
Ludovic Courtès a06a99ff77 build-system/gnu: Improve support for "lib" outputs; support "doc" outputs.
* guix/build/gnu-build-system.scm (configure)[package-name]: New
  procedure.
  When LIBDIR is true and INCLUDEDIR is false, add
  --includedir=LIBDIR/include.
  Add support for --docdir when a "doc" output exists.
2013-01-10 00:08:40 +01:00
Ludovic Courtès 4155e2a909 Update license headers of builder-side code.
Change license headers with this script:

  (use-modules (guix build utils))

  (fluid-set! %default-port-encoding "UTF-8")

  (substitute* (cons "distro/packages/ld-wrapper.scm"
		     (find-files "guix/build" "\\.scm$"))
    (("^([[:graph:]]+) This file is part of Guix." _ comment-start)
     (string-append comment-start " This file is part of GNU Guix."))
    (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start)
     (string-append comment-start
		    " GNU Guix --- Functional package management for GNU\n"))
    (("^([[:graph:]]+) Guix is " _ comment-start)
     (string-append comment-start " GNU Guix is "))
    (("^([[:graph:]]+) along with Guix." _ comment-start)
     (string-append comment-start " along with GNU Guix."))
    (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start)
     (string-append comment-start " Copyright ©")))

* distro/packages/ld-wrapper.scm, guix/build/download.scm,
  guix/build/gnu-build-system.scm, guix/build/union.scm,
  guix/build/utils.scm: Update license headers.
2013-01-05 16:08:07 +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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
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 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