Commit Graph

849 Commits

Author SHA1 Message Date
Arun Isaac 89e7f90d0b
build-system: python: Do not double wrap executables.
* guix/build/python-build-system.scm (wrap): Only wrap executables that have
not already been wrapped.
* guix/build/utils.scm (wrapper?): New function.
2018-11-25 01:31:23 +05:30
Jan Nieuwenhuizen cf7658f7cb
Merge branch 'core-updates' into core-updates-next 2018-10-21 23:19:35 +02:00
Alex Vong 418f1b2414
java-utils: Use 'strip-store-file-name'.
See the discussion at
<https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00250.html>.

* guix/build/java-utils.scm (package-name-version): Remove it.
(install-javadoc): Use 'strip-store-file-name' instead of
'package-name-version'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-10-19 23:11:07 +02:00
Alex Vong 58352f269e
build-system/haskell: Use 'strip-store-file-name'.
See the discussion at
<https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00250.html>.

* guix/build/haskell-build-system.scm (package-name-version): Remove it.
(configure): Use 'strip-store-file-name' instead of 'package-name-version'.
(setup-compiler): Likewise.
(make-ghc-package-database): Likewise.
(register): Likewise.
* gnu/packages/haskell.scm (ghc-cairo)[arguments]: Likewise.
* gnu/packages/agda.scm (agda)[arguments]: Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-10-19 23:11:07 +02:00
Marius Bakke cf6db76d2a
Merge branch 'master' into core-updates 2018-10-05 19:15:39 +02:00
Andy Patterson a7b751965f
build-system/asdf: Properly handle dependency specification casing.
* guix/build/lisp-utils.scm (normalize-dependency): Modify match
clauses to match the upper-case symbols that lisp produces.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-10-02 14:53:39 +02:00
Timothy Sample bb6419f374
build-system: haskell: Add #:cabal-revision argument.
Add a #:cabal-revision argument for specifying which Cabal file revision
from Hackage should be used.

* guix/build-system/haskell.scm (source-url->revision-url): New function.
(lower): Accept a cabal-revision keyword argument, convert it to an
origin record, and add it to the resulting bag's host-inputs.
(haskell-build): Pass the cabal-revision input to the builder as an
argument.
* guix/build/haskell-build-system.scm (patch-cabal-file): New phase.
(%standard-phases): Add it.
2018-10-01 12:12:08 +02:00
Ludovic Courtès 240a9c69a6
perform-download: Optionally report a "download-progress" trace.
* guix/scripts/perform-download.scm (perform-download): Add
 #:print-build-trace? and pass it to 'url-fetch'.
(guix-perform-download): Define 'print-build-trace?' and pass it to
'perform-download'.
* guix/build/download.scm (ftp-fetch): Add #:print-build-trace? and
honor it.
(url-fetch): Likewise.
* nix/libstore/builtins.cc (builtinDownload): Set _NIX_OPTIONS
environment variable.
2018-09-27 23:21:53 +02:00
Marius Bakke 6a0427af6c
Merge branch 'master' into core-updates 2018-09-26 01:11:32 +02:00
Ludovic Courtès a387b0bebb
store-copy: Display a progress bar when copying store items.
* guix/build/store-copy.scm (populate-store): Add #:log-port parameter.
Use 'progress-reporter/bar' to report progress.
2018-09-23 23:34:16 +02:00
Jan Nieuwenhuizen efe3c5717d
guix: copy-linux-headers: Extract procedure, add headers.
* guix/build/make-bootstrap.scm (copy-linux-headers): New procedure; extract
from make-stripped-libc and add headers for Mes bootstrap.
(make-stripped-libc): Use it.
2018-09-23 09:46:25 +02:00
Marius Bakke 2817ac3c18
Merge branch 'master' into core-updates 2018-09-20 13:37:58 +02:00
Andy Patterson 5f6908d664
build-system/asdf: Adopt asdf conventions.
The asdf documentation specifies that asdf:load-asd should be preferred to
calling load on a system definition file.

* guix/build/lisp-utils.scm (compile-system): Replace load with asdf:load-asd.
(system-dependencies): Likewise.
(test-system): Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-09-19 18:25:28 +02:00
Andy Patterson e831a1668b
build-system/asdf: Use invoke.
* guix/build/lisp-utils.scm (lisp-eval-program): Replace system* and error
handling with invoke.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-09-19 18:25:28 +02:00
Andy Patterson 29a3ffb446
build-system/asdf: Log lisp system invocations.
* guix/build/lisp-system.scm: (lisp-eval-program): Log the arguments to
system*.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-09-19 18:25:28 +02:00
Andy Patterson 7b6b7cdcc5
build-system/asdf: Handle all asdf dependency specifications.
Add support for dependencies of the form (:version <name> <version>),
(:feature <feature> <dependency-specification>) and (:require <module-name>),
as defined by
<https://common-lisp.net/project/asdf/asdf.html#The-defsystem-grammar>.

* guix/build/lisp-utils.scm (normalize-dependency): New variable.
(make-asd-file)[dependencies]: Use it to generate dependencies with normalized
names.
[dependency-name]: New variable.
[registry]: Use it to flatten the normalized dependencies.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-09-19 18:25:28 +02:00
Leo Famulari d763940711
Merge branch 'master' into core-updates 2018-09-13 13:32:39 -04:00
Ludovic Courtès 2225d56a14
profiles: Correctly deal with etc/ being a relative symlink.
Fixes <https://bugs.gnu.org/32686>.
Reported by Oleg Pykhalov <go.wigust@gmail.com>.

* guix/build/profiles.scm (ensure-writable-directory): Add #:symlink.
[absolute?]: New procedure.
[unsymlink]: Use it to determine how to resolve readlink's result.
(build-profile): Pass SYMLINK to 'ensure-writable-directory'.
* tests/profiles.scm ("profile-derivation when etc/ is a relative symlink"):
New test.
2018-09-11 00:14:58 +02:00
Ludovic Courtès f8121329b1
syscalls: Report lack of a libc symbol as ENOSYS.
* guix/build/syscalls.scm (syscall->procedure): Throw to 'system-error
with ENOSYS when NAME cannot be found.
2018-09-10 17:47:52 +02:00
Marius Bakke 839167ff9d
Merge branch 'staging' into core-updates 2018-08-25 16:44:07 +02:00
Marius Bakke 173d291466
Merge branch 'master' into staging 2018-08-25 16:38:51 +02:00
Ludovic Courtès 93c333895a
grafts: Add (guix build debug-link) and use it.
Fixes <https://bugs.gnu.org/19973>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/build/debug-link.scm: New file.
* guix/build/graft.scm (%graft-hooks): New variable.
(graft): Add #:hooks and honor it.
* guix/grafts.scm (graft-derivation/shallow): Add (guix build
debug-link) and (guix elf) to #:modules.
* tests/debug-link.scm: New file.
* Makefile.am (MODULES): Add guix/build/debug-link.scm.
(SCM_TESTS): Add tests/debug-link.scm.
2018-08-24 18:01:05 +02:00
Ludovic Courtès e4297aa8b9
grafts: Add high-level 'graft' procedure on the build side.
* guix/build/graft.scm (graft): New procedure.
* guix/grafts.scm (graft-derivation/shallow)[build]: Use it instead of
inline code.
2018-08-24 17:57:56 +02:00
Marius Bakke bf91e6835d
build-system/meson: Strip RUNPATH and remove PatchELF traces.
* guix/build-system/meson.scm (%meson-build-system-modules): Don't
import (guix build rpath).
* guix/build/meson-build-system.scm (fix-runpath): Rename to ...
(shrink-runpath): ... this.  Update docstring.  Remove AUGMENT-RPATH calls and
related code.
(%standard-phases): Add 'shrink-runpath'.
2018-08-22 18:01:09 +02:00
Jelle Licht e6c4e41102
utils: Generate valid substitutions in 'wrap-program'.
* guix/build/utils.scm (wrap-program)[export-variable]: Generate valid bash
  substitutions when using custom separators.
2018-08-20 17:00:45 +02:00
Julien Lepiller dd1e45335e
guix: svn: Remove all .svn folders.
* guix/build/svn.scm (svn-fetch): Remove all .svn folders as they contain
timestamps.
2018-08-19 17:34:22 +02:00
Ricardo Wurmus b86c019efb
Merge branch 'staging' into core-updates 2018-08-13 20:39:32 +02:00
Ricardo Wurmus a7e231a2a3
build-system/haskell: Let all phases return #T unconditionally.
* guix/build/haskell-build-system.scm (make-ghc-package-database, register,
check, haddock): Return #T unconditionally; use INVOKE.
2018-08-09 14:48:31 +02:00
Mark H Weaver 82230603ce
build-system/gnu: If a phase returns #f, the build fails.
Fixes <https://bugs.gnu.org/31974>.
Introduced by commit d8a3b1b9e8.

* guix/build/gnu-build-system.scm (gnu-build): Use 'every' instead
of 'for-each'.
2018-08-03 23:12:33 -04:00
Marius Bakke 1af575f04d
Merge branch 'master' into staging 2018-07-28 18:34:59 +02:00
Marius Bakke a1454169e0
gnu: python: Update to 3.7.0.
* gnu/packages/python.scm (python-3.6): Rename to ...
(python-3.7): ... this.  Update to 3.7.0.
[arguments]: Remove phase 'patch-timestamp-for-pyc-files' and related code.
Add phases to unset SOURCE_DATE_EPOCH during the check phase.
(python-3): Is now PYTHON-3.7.
* guix/build/python-build-system.scm (enable-bytecode-determinism): Don't set
DETERMINISTIC_BUILD.
2018-07-28 15:52:26 +02:00
Marius Bakke 94eb59fb4a
build-system/meson: Remove RUNPATH workarounds.
* guix/build-system/meson.scm (default-patchelf): Remove.
(lower)[build-inputs]: Remove PATCHELF.
(meson-build): Don't delete 'fix-runpath' phase on armhf.
* guix/build/meson-build-system.scm (configure): Add "--c_link_args" and
  "-cpp_link_args" instead of setting LDFLAGS.
(meson-build): Don't apply 'fix-runpath' phase.
2018-07-28 14:54:18 +02:00
Ludovic Courtès ac46a1c8e4
Merge branch 'master' into core-updates 2018-07-26 18:15:13 +02:00
Danny Milosavljevic 8376f10a30
ruby-build-system: Make phase "replace-git-ls-files" handle more cases.
* guix/build/ruby-build-system.scm (replace-git-ls-files): Modify.
2018-07-24 22:55:38 +02:00
Marius Bakke 706ae8e15c
Merge branch 'master' into core-updates 2018-07-24 19:56:35 +02:00
Ludovic Courtès 2a3b1b3235
build-system: Add 'guile-build-system'.
* guix/build-system/guile.scm, guix/build/guile-build-system.scm: New
files.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document 'guile-build-system'.
2018-07-23 12:25:31 +02:00
Leo Famulari 82549f2328
build-system/go: Use invoke instead of system*.
* guix/build/go-build-system.scm (unpack, build): Use invoke.
(install-source): Unconditionally return #t.
(check): Use invoke and unconditionally return #t.
2018-07-19 19:12:54 -04:00
Julien Lepiller 79d4d47b99
guix: ant-build-system: Reorder before generating INDEX.LIST.
* guix/build/ant-build-system.scm (%standard-phases): Add
reorder-jar-content phase.
2018-07-19 19:46:31 +02:00
Christopher Baines 0d354666d3
ruby-build-system: Error or return #t from all phases.
Previously, if the tests didn't pass, the check phase would evaluate to #f,
but the package would be built sucessfully. This changes all the phases to
raise exceptions if errors are encountered, and return #t otherwise.

This involves using invoke rather than system*, so that exceptions are raised
if the program exits with a status other than 0, and also returning #t at the
end of functions.

* gnu/build/ruby-build-system.scm (unpack): Use invoke rather than system*,
and return #t at the end.
(build, check): Use invoke rather than system*.
(install): Remove the use of "and", and rewrite the error handling to raise an
exception.
(wrap): Return #t.
2018-07-15 22:19:39 +01:00
Marius Bakke 49b6dc2b4e
Merge branch 'staging' 2018-07-13 00:25:45 +02:00
Danny Milosavljevic a59b0fa2d7
build-system/haskell: Make phases fail on error.
* guix/build/haskell-build-system.scm (configure): Make it fail on error.
(run-setuphs): Make it fail on error.
2018-07-11 02:45:53 +02:00
Ludovic Courtès f03df3ee75
profiles: Factorize 'manifest-search-paths'.
* guix/profiles.scm (manifest-search-paths): New procedure.
(profile-derivation)[builder]: Use it.
* guix/build/profiles.scm (build-etc/profile): Remove $PATH.
2018-07-11 00:52:36 +02:00
Marius Bakke 873325b030
Merge branch 'master' into staging 2018-07-08 23:58:22 +02:00
Ludovic Courtès 25c7ff6a3e
syscalls: Define AT_SYMLINK_NOFOLLOW et al.
* guix/build/syscalls.scm (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR)
(AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, AT_EMPTY_PATH): New variables.
* tests/syscalls.scm ("utime with AT_SYMLINK_NOFOLLOW"): New test.
2018-07-03 17:50:04 +02:00
Ricardo Wurmus 302213b9be
build-system/meson: Use invoke.
* guix/build/meson-build-system.scm (configure, build, check, install): Use
"invoke" and unconditionally return #t.
2018-06-30 18:06:20 +02:00
Ricardo Wurmus f1728d4346
Merge branch 'master' into core-updates 2018-06-29 22:51:23 +02:00
Mark H Weaver 2c8ac3641a
gnu: java: Return #t from all phases and snippets.
* guix/build/java-utils.scm (ant-build-javadoc): Use invoke; return #t.
* guix/build/ant-build-system.scm (generate-jar-indices): Return #t and
remove vestigal plumbing.
* gnu/packages/java.scm (classpath-bootstrap, ant-bootstrap, classpath-devel)
(icedtea-6, icedtea-7, java-plexus-sec-dispatcher, ant/java8, clojure)
(java-classpathx-servletapi, java-swt, java-qdox-1.12, java-hamcrest-core)
(java-plexus-archiver, java-plexus-sec-dispatcher, java-modello-plugins-xml)
(java-asm, java-commons-collections, java-commons-bsf, java-slf4j-api)
(java-slf4j-api, java-slf4j-simple, java-stringtemplate-3)
(java-stringtemplate, antlr3, antlr3-3.3, antlr3-3.1, java-ops4j-base-lang)
(java-ops4j-pax-tinybundles, java-ops4j-pax-exam-core-spi)
(java-fasterxml-jackson-core, java-fasterxml-jackson-databind)
(java-fasterxml-jackson-modules-base-jaxb, java-ecj-3, java-ecj-3.5)
(java-fasterxml-jackson-dataformat-yaml, java-woodstox-core)
(java-fasterxml-jackson-dataformat-xml, java-testng, java-jnacl)
(java-bouncycastle, java-powermock-core, java-powermock-modules-junit4)
(java-jansi-native, java-jansi, java-commons-httpclient, java-commons-vfs)
(java-apache-ivy, java-janino, java-logback-core): Return #t from all phases
and snippets, use invoke where appropriate, and remove vestigial plumbing.
2018-06-28 03:55:37 -04:00
Mark H Weaver 0e6cce2e01
meson-build-system: Return #t from all phases.
* guix/build/meson-build-system.scm (configure, build, check, install):
(fix-runpath): Use 'invoke' and return #t from all phases.
2018-06-28 03:55:34 -04:00
Marius Bakke 0106d6b40d
Merge branch 'master' into staging 2018-06-19 17:02:16 +02:00
Ricardo Wurmus b194da0d68
build-system/waf: Use invoke.
* guix/build/waf-build-system.scm (call-waf): Use "invoke" and unconditionally
return #t.
2018-06-19 10:48:14 +02:00