Commit Graph

71 Commits (8146fdb3342361dedcf36d96d7a53a7dc0858e63)

Author SHA1 Message Date
Andreas Enge 9200c11009 build-system/perl: Honour phases argument in perl build system.
* guix/build-system/perl.scm (perl-build): Propagate phases argument to
    builder.
2013-12-09 13:50:58 +01:00
Ludovic Courtès f4badde3fa build-system/gnu: Fix reference to Gettext in 'dist-package'.
* guix/build-system/gnu.scm (dist-package): Change 'gettext' to
  'gnu-gettext'.
2013-12-04 21:43:55 +01:00
Ludovic Courtès dd1a5a152c derivations: Use more keyword parameters for 'build-expression->derivation'.
* guix/derivations.scm (build-expression->derivation): Turn 'system' and
  'inputs' into keyword parameters.
  Adjust callers accordingly.
* gnu/system/linux.scm, gnu/system/vm.scm, guix/build-system/cmake.scm,
  guix/build-system/gnu.scm, guix/build-system/perl.scm,
  guix/build-system/python.scm, guix/build-system/trivial.scm,
  guix/download.scm, guix/packages.scm, guix/profiles.scm,
  guix/scripts/pull.scm, tests/derivations.scm, tests/guix-build.sh,
  tests/monads.scm, tests/store.scm, tests/union.scm: Adjust users of
  'build-expression->derivation' and 'derivation-expression'
  accordingly.
* doc/guix.texi (Derivations): Adjust 'build-expression->derivation'
  documentation accordingly.
  (The Store Monad): Likewise for 'derivation-expression'.
2013-12-04 16:07:53 +01:00
Ludovic Courtès 977f03ffd3 build-system/cmake: Build out of source tree by default.
* guix/build-system/cmake.scm (cmake-build): Change 'out-of-source?' to
  default to #t.
* guix/build/cmake-build-system.scm (configure): Add 'out-of-source?'
  keyword parameter and honor it.
2013-11-28 00:15:07 +01:00
Ludovic Courtès edae5b3d50 Merge branch 'master' into core-updates
Conflicts:
	guix/packages.scm
2013-11-20 23:51:26 +01:00
Ludovic Courtès 5dfd5b82c2 build-system/python: Add #:test-target parameter.
* guix/build-system/python.scm (python-build): Add #:test-target
  parameter.  Reported by Eric Bavier <ericbavier@gmail.com>.
2013-11-20 19:03:26 +01:00
Ludovic Courtès ff8061b591 Merge branch 'master' into core-updates 2013-11-01 12:59:31 +01:00
Ludovic Courtès 7587041028 build-system/{cmake,perl}: Don't use (guix build gnu-build-system).
Previously references to '%standard-phases' in builder-side code would
refer to the wrong one.

* guix/build-system/cmake.scm (cmake-build): Remove (guix build
  gnu-build-system) from the default MODULES value.
* guix/build-system/perl.scm (perl-build): Likewise.
2013-10-29 00:08:44 +01:00
Ludovic Courtès b421cebd6a build-system/perl: Lazily resolve (gnu packages perl).
* guix/build-system/perl.scm (default-perl): New procedure.
  (perl-build): Use it.
2013-10-12 22:29:32 +02:00
Ludovic Courtès 7e2b10a53f build-system/{gnu,cmake}: Remove #:patches and #:patch-flags parameters.
* guix/build/gnu-build-system.scm (patch): Remove.
  (%standard-phases): Remove 'patch'.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Remove
  #:patches and #:patch-flags parameters.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/python.scm (package-with-explicit-python): Update
  comment.
2013-10-10 23:15:57 +02:00
Ludovic Courtès 03761a4465 build-system/trivial: Take the 'source' field into account.
* guix/build-system/trivial.scm (trivial-build): When SOURCE is true,
  add it to INPUTS.
  (trivial-cross-build): Likewise.
* tests/packages.scm ("trivial with source"): New test.
2013-09-27 00:46:17 +02:00
Ludovic Courtès 59688fc4b5 derivations: 'derivation' and related procedures return a single value.
* guix/derivations.scm (derivation->output-path,
  derivation->output-paths): New procedures.
  (derivation-path->output-path): Use 'derivation->output-path'.
  (derivation-path->output-paths): Use 'derivation->output-paths'.
  (derivation): Accept 'derivation?' objects as inputs.  Return a single
  value.
  (build-derivations): New procedure.
  (compiled-modules): Use 'derivation->output-paths'.
  (build-expression->derivation)[source-path]: Add case for when the
  input matches 'derivation?'.
  [prologue]: Accept 'derivation?' objects in INPUTS.
  [mod-dir, go-dir]: Use 'derivation->output-path'.
* guix/download.scm (url-fetch): Adjust to the single-value return.
* guix/packages.scm (package-output): Use 'derivation->output-path'.
* guix/scripts/build.scm (guix-build): When the argument is
  'derivation-path?', pass it through 'read-derivation'.
  Use 'derivation-file-name' to print out the .drv file names, and to
  register them.  Use 'derivation->output-path' instead of
  'derivation-path->output-path'.
* guix/scripts/package.scm (roll-back): Adjust to the single-value
  return.
  (guix-package): Use 'derivation->output-path'.
* guix/ui.scm (show-what-to-build): Adjust to deal with 'derivation?'
  objects instead of .drv file names.
* gnu/system/grub.scm (grub-configuration-file): Use
  'derivation->output-path' instead of 'derivation-path->output-path'.
* gnu/system/vm.scm (qemu-image, system-qemu-image): Likewise.
* tests/builders.scm, tests/derivations.scm, tests/packages.scm,
  tests/store.scm, tests/union.scm: Adjust to the new calling
  convention.
* doc/guix.texi (Defining Packages, The Store, Derivations): Adjust
  accordingly.
2013-09-18 18:49:53 +02:00
Andreas Enge aae4ead814 Merge branch 'python' 2013-09-14 10:45:01 +02:00
Andreas Enge e1a264f6fa guix: python: Do not import %standard-phases from gnu-build-system.
* guix/build-system/python.scm (python-build): Drop module gnu-build-system.
    Thanks to Ludovic Courtès <ludo@gnu.org>.
2013-09-10 20:32:50 +02:00
Andreas Enge 1d1f939798 guix: python: Add parameter #:phases to build system.
* guix/build-system/python.scm (python-build): Use parameter #:phases.
2013-09-10 11:58:02 +02:00
Andreas Enge 11bb85a10d guix: python: Add package-with-python2, a procedure rewriting a package
to compile with Python 2 instead of the default Python 3.

* guix/build-system/python.scm (default-python2, package-with-explicit-python,
    package-with-python2): New procedures.
* guix/build-system/python.scm (python2-pytz, python2-babel): Use
    package-with-python2.
2013-09-08 16:57:37 +02:00
Andreas Enge 3df47231e6 guix: python: Switch to python-wrapper as the default version for the python
build system (switches to Python 3) and compute python-version instead of
  passing it as a parameter.

* guix/build-system/python.scm (default-python): Switch to python-wrapper.
* guix/build-system/python.scm (python-build): Drop parameter #:python-version.
* guix/build/python-build-system.scm (wrap): Compute python version from input.
2013-09-04 18:07:55 +02:00
Ludovic Courtès 8badfc5558 build-system/cmake: Fix typo.
* guix/build-system/cmake.scm (default-cmake): Add missing quote.
2013-09-03 10:20:59 +02:00
Ludovic Courtès 0a2873e515 build-system/gnu: Delay resolution of (@ (gnu packages cmake) cmake).
* guix/build-system/cmake.scm (default-cmake): New procedure.
  (cmake-build): Use it.
2013-09-03 10:18:38 +02:00
Ludovic Courtès fe12c3458c build-system/gnu: Add `dist-package'.
* guix/build/gnu-dist.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/build-system/gnu.scm (%default-modules): New variable.
  (gnu-build): Use it.
  (dist-package): New procedure.
2013-08-24 17:30:31 +02:00
Ludovic Courtès 82f9b17687 build-system/gnu: Remove the "debug" output when `strip-binaries?' is #f.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Delete "debug"
  from OUTPUTS when STRIP-BINARIES? is false.
* gnu/packages/cross-base.scm (cross-libc): Leave `outputs' unchanged.
  This reverts commit a4627d4.
2013-07-04 13:26:35 +02:00
Ludovic Courtès a3cff41dd1 build-system/gnu: `package-with-explicit-inputs' skips non-GBS packages.
* guix/build-system/gnu.scm (package-with-explicit-inputs)[rewritten-input]:
  Leave P unchanged if its build system is not GNU-BUILD-SYSTEM.
2013-06-25 23:04:32 +02:00
Ludovic Courtès 7e873a6708 build-system/gnu: Augment `package-with-explicit-inputs' for cross builds.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Add
  `native-inputs' keyword parameter.  Allow INPUTS and NATIVE-INPUTS to
  be thunks.
2013-06-25 20:54:56 +02:00
Ludovic Courtès ac5c1cec86 build-system/trivial: Don't bind `%target' in the builder.
* guix/build-system/trivial.scm (trivial-cross-build): Don't bind
  `%target' here since this causes problem when BUILDER
  contains (use-modules ...) clauses, and can be achieved differently
  anyway.
2013-06-25 00:06:31 +02:00
Ludovic Courtès f7c3429073 build-system/gnu: Disable test suite when cross building.
* guix/build-system/gnu.scm (gnu-cross-build): Change #:tests? to
  default to #f.
2013-06-24 23:26:50 +02:00
Ludovic Courtès 56c092ce94 build-system/gnu: Unify with (guix build-system gnu-cross-build).
* guix/build/gnu-build-system.scm (set-paths): Add `native-inputs' and
  `native-search-paths' keyword parameters.  Honor them.
  (configure): Add `target' and `native-inputs' keyword parameters.
  Look for Bash in NATIVE-INPUTS or INPUTS.  Pass `--host' when TARGET
  is true.
  (strip): Add `strip-command' keyword parameter.  Use it.
* guix/build/gnu-cross-build.scm: Remove.
* Makefile.am (MODULES): Adjust accordingly.
* gnu/packages/acl.scm, gnu/packages/attr.scm, gnu/packages/base.scm,
  gnu/packages/bash.scm, gnu/packages/gawk.scm,
  gnu/packages/gettext.scm, gnu/packages/guile.scm,
  gnu/packages/libffi.scm, gnu/packages/libsigsegv.scm,
  gnu/packages/linux.scm, gnu/packages/ncurses.scm,
  gnu/packages/readline.scm, guix/build-system/gnu.scm: Replace
  `%standard-cross-phases' by `%standard-phases'.  Remove references
  to (guix build gnu-cross-build).
2013-06-21 00:25:54 +02:00
Ludovic Courtès 9c71a2aec4 build-system/trivial: Fix introduction of `%target' when cross-building.
* guix/build-system/trivial.scm (trivial-cross-build): Wrap BUILDER in a
  `let' rather than in `begin'.
2013-06-15 23:39:32 +02:00
Ludovic Courtès a3e69bb892 gnu: Fix `static-package' arguments overriding.
* guix/build-system/gnu.scm (static-package): Call `package-arguments'
  from within the `arguments' field, so it see the
  right (%current-target-system).
2013-06-05 16:39:58 +02:00
Ludovic Courtès 5282181d51 build-system/python: Avoid circular dependency.
This fixes a circular dependency introduced in commit acc26ff ("gnu: Add
pytz.").

* guix/build-system/python.scm (default-python): New procedure.
  (python-build): Use it.
2013-05-30 00:47:34 +02:00
Ludovic Courtès ea84ec7711 build-system/gnu: Fix typo in `gnu-cross-build'.
* guix/build-system/gnu.scm (gnu-cross-build)[builder]: When
  IMPLICIT-TARGET-INPUTS is #f, default to '().
2013-05-27 23:43:00 +02:00
Ludovic Courtès ee4d736881 build-system/gnu: Make sure build input variables contain pairs.
* guix/build-system/gnu.scm (gnu-cross-build)[builder]: Make sure
  %build-host-inputs and %build-target-inputs always contain pairs, not
  lists.
2013-05-25 15:35:36 +02:00
Ludovic Courtès 5dce82180b build-system/trivial: Implement the cross-build protocol.
* guix/build-system/trivial.scm (guile-for-build): New procedure.
  (trivial-build): Use it.
  (trivial-cross-build): New procedure.
  (trivial-build-system): Use it.
2013-05-24 23:53:06 +02:00
Ludovic Courtès 264218a47e build-system/gnu: Implement cross build.
* guix/build-system/gnu.scm (inputs-search-paths): New procedure.
  (standard-search-paths): Use it.
  (expand-inputs): New procedure.
  (standard-inputs): Use it.
  (standard-cross-packages, standard-cross-inputs,
  standard-cross-search-paths, gnu-cross-build): New procedures.
  (gnu-build-system): Set `cross-build' field to `gnu-cross-build'.
* gnu/packages/cross-base.scm: Export `cross-gcc', `cross-binutils', and
  `cross-libc'.
* guix/build/gnu-cross-build.scm: New file.
* Makefile.am (MODULES): Add it.
2013-05-24 22:44:15 +02:00
Nikita Karetnikov 40506d5d92 Add 'python-build-system'.
* guix/build-system/python.scm, guix/build/python-build-system.scm: New files.
* Makefile.am (MODULES): Add them.
2013-05-08 22:46:12 +00:00
Ludovic Courtès 35ac56b63e build-system/{perl,cmake}: Keep the standard search paths of gnu-build-system.
Reported by Andreas Enge <andreas@enge.fr>.

* guix/build-system/gnu.scm (standard-search-paths): New procedure.
  (gnu-build): Use it.
* guix/build-system/perl.scm (perl-build):
  Append (standard-search-paths) to the search paths of PERL.
* guix/build-system/cmake.scm (cmake-build):
  Append (standard-search-paths) to SEARCH-PATHS.
2013-04-16 14:05:00 +02:00
Ludovic Courtès 068cdcd07c build-system/gnu: Fix search path computation with implicit inputs.
Reported by Andreas Enge <andreas@enge.fr>.

* guix/build-system/gnu.scm (standard-packages): New procedure.
  (standard-inputs): Use it instead of resolving things locally.
  (gnu-build)[implicit-search-paths]: Map over (standard-packages), not
  over STANDARD-INPUTS.
2013-04-09 19:01:21 +02:00
Ludovic Courtès a18eda2747 packages: Add `native-search-paths' field and honor it.
* guix/packages.scm (<search-path-specification>): New record type.
  (search-path-specification->sexp): New procedure.
  (<package>)[native-search-paths]: New field.
  (package-derivation): Accumulate the search paths, and pass them
  as #:search-paths toe BUILDER.
* guix/build-system/gnu.scm (gnu-build): Add #:search-paths.  Compute
  `implicit-search-paths'.  Pass #:search-paths in BUILDER.
* guix/build-system/perl.scm (perl-build): Add #:search-paths, pass it
  to BUILDER with the search paths of PERL.
* guix/build-system/cmake.scm (cmake-build): Add #:search-paths, pass it
  to BUILDER.
* guix/build-system/trivial.scm (trivial-build): Add #:search-paths,
  ignore it.
* guix/build/gnu-build-system.scm (set-paths): Add #:search-paths.
  Remove explicit settings of CPATH, LIBRARY_PATH, and PKG_CONFIG_PATH.
  Instead, walk SEARCH-PATHS and call `set-path-environment-variable'
  for them.
* guix/build/perl-build-system.scm (perl-build): Remove PERL5LIB setting.
* tests/packages.scm ("search paths"): New test.
* gnu/packages/bootstrap.scm (%bootstrap-guile)[raw]: Add
  #:search-paths.
  (%bootstrap-gcc): Add `native-search-paths' field.
* gnu/packages/perl.scm (perl): Likewise.
* gnu/packages/pkg-config.scm (pkg-config): Likewise.
* gnu/packages/glib.scm (intltool): Remove `arguments'.
* gnu/packages/avahi.scm (avahi): Remove #:phases.
2013-03-30 22:57:03 +01:00
Ludovic Courtès a96748bb46 build-system/gnu: Remove #:path-exclusions parameter.
* guix/build/gnu-build-system.scm (set-paths): Remove `path-exclusions'
  parameter.  Replace `relevant-input-directories' by
  `input-directories'.
* guix/build-system/gnu.scm (gnu-build): Remove `path-exclusions'
  parameter; don't pass it in BUILDER.
* guix/build-system/cmake.scm (cmake-build): Likewise.
2013-03-30 21:46:59 +01:00
Cyril Roelandt c6bded8a29 Add (guix build-system cmake).
* guix/build/cmake-build-system.scm, guix/build-system/cmake.scm: New files.
* Makefile.am (MODULES): Add them.
2013-03-28 21:04:54 +01:00
Ludovic Courtès 08fd1ebefd Add (guix build-system perl).
* guix/build-system/perl.scm, guix/build/perl-build-system.scm: New files.
* Makefile.am (MODULES): Add them.
* guix/build-system/gnu.scm (standard-inputs): Make public.
2013-03-04 00:48:00 +01:00
Ludovic Courtès 9011e97f8d build-system/gnu: Make the strip behavior of `static-package' configurable.
* guix/build-system/gnu.scm (static-package): Add #:strip-all? keyword
  parameter.
2013-02-14 01:12:24 +01:00
Ludovic Courtès a38f0ab0b9 build-system/gnu: Clarify docstring of `package-with-extra-configure-variable'.
* guix/build-system/gnu.scm (package-with-extra-configure-variable): Add
  "recursively" in the docstring.
2013-02-08 18:03:36 +01:00
Ludovic Courtès 21c203a53a packages: Mark the `arguments' field of <package> as thunked.
* guix/packages.scm (<package>): Mark `arguments' as thunked.
  (package-derivation): Adjust accordingly.  Parameterize
  %CURRENT-SYSTEM to SYSTEM, so that arguments can refer to it.

* guix/build-system/gnu.scm (package-with-explicit-inputs): Expect
  `package-arguments' to always return a list, and return a list.
  (package-with-extra-configure-variable): Likewise.
  (static-package): Likewise.
* gnu/packages/base.scm (patch, findutils, gcc-4.7, binutils-boot0,
  gcc-boot0, glibc-final-with-bootstrap-bash, cross-gcc-wrapper,
  static-bash-for-glibc, binutils-final, gcc-final): Change `arguments'
  from a lambda to a list, and use (%current-system) as needed.
  (nix-system->gnu-triplet, boot-triplet): Have the first argument
  default to (%current-system).
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Have `system'
  default to (%current-system).
  (%bootstrap-gcc): Change `arguments' to a list.
* gnu/packages/gawk.scm (gawk): Likewise.
* gnu/packages/m4.scm (m4): Likewise.
* gnu/packages/make-bootstrap.scm (%glibc-for-bootstrap): Likewise, and
  expect `package-arguments' to return a list.
  (%static-inputs, %gcc-static, tarball-package): Likewise.
* gnu/packages/ncurses.scm (ncurses): Likewise.
2013-01-23 23:33:09 +01:00
Ludovic Courtès 1ffa7090b9 distro: Change the module name space to (gnu ...).
* distro: Rename to...
* gnu: ... this.  Update module names accordingly.
* Makefile.am: Adjust accordingly.
* po/POTFILES.in: Likewise.
* distro.scm: Search for files under /gnu/packages instead of
  /distro/packages.
* gnu/packages/base.scm (ld-wrapper-boot3): Likewise.
2013-01-18 01:07:31 +01:00
Ludovic Courtès 29c1793dc2 build-system/gnu: Allow the `source' argument to be #f.
* guix/build-system/gnu.scm (gnu-build): Allow SOURCE to be #f.
2013-01-15 01:05:39 +01:00
Ludovic Courtès 4050e5d6cf Merge branch 'master' into core-updates
Conflicts:
	build-aux/download.scm
	distro/packages/autotools.scm
	distro/packages/base.scm
	distro/packages/bootstrap.scm
	distro/packages/lsh.scm
	distro/packages/make-bootstrap.scm
	distro/packages/ncurses.scm
	distro/packages/perl.scm
	tests/derivations.scm
	tests/union.scm
2013-01-06 17:33:02 +01:00
Ludovic Courtès 233e76769a Update license headers.
Change all license headers, except guix/build/* and ld-wrapper.scm, with
this code:

  (use-modules (guix build utils)
	       (srfi srfi-1))

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

  (substitute* (remove (lambda (f)
			 (or (string-contains f ".tar.")
			     (string-contains f ".git/")
			     (string-contains f ".so")
			     (string-suffix? ".o" f)
			     (string-suffix? ".a" f)
			     (string-suffix? ".go" f)
			     (string-suffix? ".pdf" f)
			     (string-suffix? ".png" f)
			     (string-suffix? ".info" f)
			     (equal? (basename f) "guix-daemon")
			     (equal? (basename f) "nix-setuid-helper")
			     (string-contains f "nix-upstream/")
			     (string-contains f "distro/packages/bootstrap/")))
		       (find-files "." "\\.[a-z]+$"))
    (("^([[: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 ©")))

Change headers using C-style comments manually.
2013-01-06 00:47:50 +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
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 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