Commit Graph

27 Commits

Author SHA1 Message Date
Efraim Flashner 3646a44a14
build-system: cmake: Add substitutable keyword.
* guix/build-system/cmake.scm (cmake-build, cmake-cross-build): Add
substitutable keyword.
2020-06-16 16:40:27 +03:00
Ludovic Courtès 2073b55e6b
gnu: gcc: Switch back to using 'C_INCLUDE_PATH' instead of 'CPATH'.
Fixes <https://bugs.gnu.org/30756>.
Initially reported by Julien Lepiller <julien@lepiller.eu>.

* gnu/packages/base.scm (make-gcc-libc): Remove
'treat-glibc-as-system-header' phase from 'arguments'.
* gnu/packages/commencement.scm (gcc-final): Likewise.
* gnu/packages/gcc.scm (gcc-4.7)[arguments]: Add "include/c++" to
'CPLUS_INCLUDE_PATH'.
(gcc-6)[native-search-paths]: Remove.
* gnu/packages/make-bootstrap.scm (gcc-for-bootstrap): Remove
'native-search-paths' and 'arguments'.
* gnu/packages/patches/python-2.7-search-paths.patch,
gnu/packages/patches/python-3-search-paths.patch: Replace "CPATH" with
"C_INCLUDE_PATH".
* guix/build-system/cmake.scm (lower): When not cross-compiling, move
INPUTS from the 'host-inputs' field to the 'build-inputs' field of the
bag, right after NATIVE-INPUTS.
* guix/build-system/glib-or-gtk.scm (lower): Likewise.
* guix/build-system/gnu.scm (lower): Likewise.
* guix/build-system/meson.scm (lower): Likewise.
2020-02-06 18:47:15 +01:00
Marius Bakke 88b263465c
build-system/cmake: Enable parallel tests by default.
* guix/build-system/cmake.scm (cmake-build, cmake-cross-build): Set
the PARALLEL-TESTS? key to #t.
2020-01-26 01:52:55 +01:00
Mathieu Othacehe 534537e2ef
gnu: cmake: Fix cross-compilation.
* gnu/packages/cmake.scm (cmake-minimal-cross): New package.
* guix/build-system/cmake.scm (default-cmake): Add new target argument and use
it to select cmake-minimal or cmake-minimal-cross.
(lower): Pass target to default-cmake.
2019-11-15 17:32:25 +01:00
Maxim Cournoyer 2f33a7321e
cmake: Generate documentation.
To prevent complicating the dependencies of a core tool, a new variant,
CMAKE-MINIMAL is introduced and the CMake build system is configured to use it
by default.  The regular CMAKE package gains a manpage, info manual as well
as HTML documentation.

Fixes issue #33497 (https://bugs.gnu.org/33497).

* gnu/packages/cmake.scm (gnu): Use modules (gnu packages python-xyz),
(gnu packages texinfo) and (srfi srfi-1).
(cmake-minimal): Rename the original cmake variable to this.
[phases]{configure}: Extract the configure script arguments to...
[configure-flags]: here.
[properties]: Set the HIDDEN? property to #t.
(cmake): New variable, which inherits from CMAKE-MINIMAL.
[phases]{move-html-doc}: Add phase.
[native-inputs]: Add PYTHON-SPHINX and TEXINFO.
[outputs]: Add the "doc" output.
[properties]: Clear the inherited HIDDEN? property.
* guix/build-system/cmake.scm (default-cmake): Use CMAKE-MINIMAL instead of
CMAKE.
2019-03-20 21:38:19 -04:00
Ricardo Wurmus d2ac5e2975
build-system/cmake: Add support for cross compilation.
Fixes <https://bugs.gnu.org/26897>.

* guix/build-system/gnu.scm: Export standard-cross-packages.
* guix/build-system/cmake.scm (cmake-cross-build): New procedure.
(lower): Add support for cross-builds.
* guix/build/cmake-build-system.scm (configure): Handle "target" argument.
2017-05-30 16:52:55 +02:00
Ludovic Courtès e89431bf01 Move search path specifications to (guix search-paths).
* guix/packages.scm (<search-path-specification>,
  search-path-specification->sexp, sexp->search-path-specification):
  Move to...
* guix/search-paths.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
* guix/build-system/cmake.scm, guix/build-system/glib-or-gtk.scm,
  guix/build-system/gnu.scm, guix/build-system/haskell.scm,
  guix/build-system/perl.scm, guix/build-system/python.scm,
  guix/build-system/ruby.scm, guix/build-system/waf.scm,
  guix/profiles.scm, guix/scripts/package.scm: Use it.
2015-05-04 23:30:51 +02:00
Ludovic Courtès d074e2f991 build-system/{cmake,glib-or-gtk}: Add #:validate-runpath? parameter.
* guix/build-system/cmake.scm (cmake-build): Add #:validate-runpath?
  parameter and pass it to BUILDER.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise.
2015-04-23 18:52:40 +02:00
Ludovic Courtès bb42c78a23 build-system: Factorize the list of modules imported on the build side.
* guix/build-system/gnu.scm (%default-modules): Rename to...
  (%gnu-build-system-modules): ... this.
  (%default-modules): New variable.
  (dist-package, gnu-build): Use %GNU-BUILD-SYSTEM-MODULES for
  #:imported-modules.
  (gnu-cross-build): Likewise, and use %DEFAULT-MODULES for #:modules.
* guix/build-system/cmake.scm (%cmake-build-system-modules): New
  variable.
  (cmake-build): Use it for #:imported-modules.
* guix/build-system/glib-or-gtk.scm (%default-imported-modules): Rename
  to...
  (%glib-or-gtk-build-system-modules): ... this.  Refer to
  %GNU-BUILD-SYSTEM-MODULES.  Adjust uses.
* guix/build-system/perl.scm (%perl-build-system-modules): New
  variable.
  (perl-build): Use it for #:imported-modules.
* guix/build-system/python.scm (%python-build-system-modules): New
  variable.
  (python-build): Use it for #:imported-modules.
* guix/build-system/ruby.scm (%ruby-build-system-modules): New variable.
  (ruby-build): Use it for #:imported-modules.
* guix/build-system/waf.scm (%waf-build-system-modules): New variable.
  (waf-build): Use it for #:imported-modules.
2015-04-01 15:34:19 +02:00
Ludovic Courtès 05962f2958 packages: Implement grafts.
Thanks to Mark H. Weaver <mhw@netris.org> for insightful discussions
and suggestions.

* guix/packages.scm (<package>)[graft]: New field.
  (patch-and-repack): Invoke 'package-derivation' with #:graft? #f.
  (package-source-derivation): Likewise.  Do not use (%guile-for-build)
  in call to 'patch-and-repack', and we could end up using a grafted
  Guile.
  (expand-input): Likewise, also for 'package-cross-derivation' call.
  (package->bag): Add #:graft? parameter.  Honor it.  Use 'strip-append'
  instead of 'package-full-name'.
  (input-graft, input-cross-graft, bag-grafts, package-grafts): New
  procedures.
  (package-derivation, package-cross-derivation): Add #:graft? parameter
  and honor it.
* gnu/packages/bootstrap.scm (package-with-bootstrap-guile): Add
  recursive call on 'graft'.
* guix/build-system/gnu.scm (package-with-explicit-inputs,
  package-with-extra-configure-variable, static-package): Likewise.
  (gnu-build): Use the ungrafted Guile to avoid full rebuilds.
  (gnu-cross-build): Likewise.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/build-system/python.scm (python-build): Likewise.
* guix/build-system/ruby.scm (ruby-build): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Likewise.
* tests/packages.scm ("package-derivation, direct graft",
  "package-cross-derivation, direct graft", "package-grafts,
  indirect grafts", "package-grafts, indirect grafts, cross",
  "package-grafts, indirect grafts, propagated inputs",
  "package-derivation, indirect grafts"): New tests.
  ("bag->derivation", "bag->derivation, cross-compilation"): Wrap in
  'parameterize'.
* doc/guix.texi (Security Updates): New node.
  (Invoking guix build): Document --no-graft.
2014-11-02 21:22:12 +01:00
Ludovic Courtès d3d337d2d8 build-system: Bags record their system and target.
* guix/build-system.scm (<bag>)[system, target]: New fields.
  (make-bag): Add #:system parameter and pass it to LOWER.
* gnu/packages/bootstrap.scm (make-raw-bag): Initialize 'system' field.
* guix/build-system/cmake.scm (lower): Likewise.
* guix/build-system/perl.scm (lower): Likewise.
* guix/build-system/python.scm (lower): Likewise.
* guix/build-system/ruby.scm (lower): Likewise.
* guix/build-system/trivial.scm (lower): Likewise.
* guix/build-system/gnu.scm (lower): Initialize 'system' and 'target'
  fields.
* guix/packages.scm (bag->derivation, bag->cross-derivation): New
  procedures.
  (package-derivation, package-cross-derivation): Use 'bag->derivation'.
* tests/packages.scm ("search paths"): Initialize 'system' and 'target'
  fields.
  ("package->bag", "package->bag, cross-compilation", "bag->derivation",
  "bag->derivation, cross-compilation"): New tests.
2014-10-05 21:58:42 +02:00
Ludovic Courtès 0d5a559f0f build-system: Introduce "bags" as an intermediate representation.
* guix/build-system.scm (<build-system>)[build, cross-build]: Remove.
  [lower]: New field.
  (<bag>): New record type.
  (make-bag): New procedure.
* guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs,
  bag-transitive-host-inputs, bag-transitive-target-inputs,
  package->bag): New procedures.
  (package-derivation): Use it; use the bag, apply its build procedure,
  etc.
  (package-cross-derivation): Likewise.
* gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure.
  (%bootstrap-guile): Use them.
* guix/build-system/trivial.scm (lower): New procedure.
  (trivial-build, trivial-cross-build): Remove 'source' parameter.  Pass
  INPUTS as is.
  (trivial-build-system): Adjust accordingly.
* guix/build-system/gnu.scm (%store, inputs-search-paths,
  standard-search-paths, expand-inputs, standard-inputs): Remove.
  (gnu-lower): New procedure.
  (gnu-build): Remove 'source' and #:implicit-inputs? parameters.
  Remove 'implicit-inputs' and 'implicit-search-paths' variables.  Get
  the source from INPUT-DRVS.
  (gnu-cross-build): Likewise.
  (standard-cross-packages): Remove call to 'standard-packages'.
  (standard-cross-inputs, standard-cross-search-paths): Remove.
  (gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'.
* guix/build-system/cmake.scm (lower): New procedure.
  (cmake-build): Remove 'source' and #:cmake parameters.  Use INPUTS and
  SEARCH-PATHS as is.  Get the source from INPUTS.
* guix/build-system/perl.scm: Likewise.
* guix/build-system/python.scm: Likewise.
* guix/build-system/ruby.scm: Likewise.
* gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers"
  to "linux-headers".
  (cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f.
  Likewise.  In 'propagated-inputs', change "cross-linux-headers" to
  "linux-headers".
* guix/git-download.scm (git-fetch): Use 'standard-packages' instead of
  'standard-inputs'.
* tests/builders.scm ("gnu-build-system"): Remove use of
  'build-system-builder'.
  ("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to
  'gnu-build'.
* tests/packages.scm ("search paths"): Adjust to new build system API.
  ("package-cross-derivation, no cross builder"): Likewise.
* doc/guix.texi (Build Systems): Add paragraph on bags.
2014-10-05 21:58:42 +02:00
Ludovic Courtès 2348fd0f51 build-system: Remove irrelevant special case.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Remove comment
  about case where GUILE is a derivation path.
* guix/build-system/cmake.scm (cmake-build): Remove case where GUILE is
  a derivation path.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/build-system/python.scm (python-build): Likewise.
* guix/build-system/ruby.scm (ruby-build): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Likewise.
2014-10-05 21:57:19 +02:00
Ludovic Courtès 9849cfc12c build-system/cmake: Add #:build-type parameter, default to "RelWithDebInfo".
* guix/build-system/cmake.scm (cmake-build): Add #:build-type.  Pass it
  in BUILDER.
* guix/build/cmake-build-system.scm (configure): Add #:build-type
  parameter and honor it.
* doc/guix.texi (Build Systems): Document #:configure-flags and
  #:build-type for CMake.
2014-10-04 22:59:38 +02:00
Ludovic Courtès bdb36958fb gnu: Split (gnu packages base), adding (gnu packages commencement).
* gnu/packages/base.scm (gnu-make-boot0, diffutils-boot0,
  findutils-boot0, %boot0-inputs, nix-system->gnu-triplet, boot-triplet,
  binutils-boot0, gcc-boot0, perl-boot0, linux-libre-headers-boot0,
  texinfo-boot0, %boot1-inputs, glibc-final-with-bootstrap-bash,
  cross-gcc-wrapper, static-bash-for-glibc, glibc-final,
  gcc-boot0-wrapped, %boot2-inputs, binutils-final, libstdc++,
  gcc-final, ld-wrapper-boot3, %boot3-inputs, bash-final, %boot4-inputs,
  guile-final, gnu-make-final, ld-wrapper, coreutils-final, grep-final,
  %boot5-inputs, %final-inputs, canonical-package, gcc-toolchain,
  gcc-toolchain-4.8, gcc-toolchain-4.9): Move to...
* gnu/packages/commencement.scm: ... here.  New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
* build-aux/check-final-inputs-self-contained.scm: Adjust accordingly.
* gnu/packages/cross-base.scm: Likewise.
* gnu/packages/make-bootstrap.scm: Likewise.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/gnu.scm (standard-packages, gnu-build,
  gnu-cross-build): Likewise.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/build-system/python.scm (python-build): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Likewise.
* guix/download.scm (url-fetch): Likewise.
* guix/gexp.scm (default-guile): Likewise.
* guix/git-download.scm (git-fetch): Likewise.
* guix/monads.scm (run-with-store): Likewise.
* guix/packages.scm (default-guile): Likewise.
* guix/scripts/package.scm (guix-package): Likewise.
* guix/scripts/refresh.scm: Likewise.
* guix/svn-download.scm (svn-fetch): Likewise.
* tests/builders.scm (%bootstrap-inputs, %bootstrap-search-paths):
  Likewise.
* tests/packages.scm ("GNU Make, bootstrap"): Likewise.
* tests/guix-package.sh: Likewise.
* gnu/services/base.scm: Use 'canonical-package' instead of xxx-final.
* gnu/services/xorg.scm: Likewise.
* gnu/system/vm.scm: Likewise.
* guix/scripts/pull.scm (guix-pull): Likewise.
2014-08-28 09:21:54 +02: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 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 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 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
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 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 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