Commit Graph

792 Commits

Author SHA1 Message Date
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
Ludovic Courtès 870677cbb8
compile: Work around non-thread-safe module autoloading.
* guix/build/compile.scm <top level>: Set 'try-module-autoload' when
running on Guile < 2.2.4.
2018-06-18 23:19:51 +02:00
Ludovic Courtès 31a63be878
database: Add 'register-items'.
* guix/build/store-copy.scm (store-info): Export.
* guix/store/database.scm (register-items): New procedure.
(register-path): Implement in terms of 'register-items'.
* gnu/build/install.scm (register-closure): Use 'register-items' instead
of 'for-each' and 'register-path'.
2018-06-14 11:17:00 +02:00
Ludovic Courtès 6892f0a247
store-copy: 'read-reference-graph' returns a list of records.
The previous implementation of 'read-reference-graph' was good enough
for many use cases, but it discarded the graph structure, which is
useful information in some cases.

* guix/build/store-copy.scm (<store-info>): New record type.
(read-reference-graph): Rewrite to return a list of <store-info>.
(closure-size, populate-store): Adjust accordingly.
* gnu/services/base.scm (references-file): Adjust accordingly.
* gnu/system/vm.scm (system-docker-image): Likewise.
* guix/scripts/pack.scm (squashfs-image, docker-image): Likewise.
* tests/gexp.scm ("gexp->derivation #:references-graphs"): Likewise.
2018-06-14 11:16:58 +02:00
Ricardo Wurmus babeea3f9f
build-system/r: Use invoke.
* guix/build/r-build-system.scm (invoke-r): Use invoke.
(pipe-to-r): Raise invoke-error on non-zero return value.
(check): Unconditionally return #t.
2018-05-31 13:24:17 +02:00
Mark H Weaver 0661758e13
Merge branch 'master' into core-updates 2018-05-21 13:22:32 -04:00
Ludovic Courtès 827c56515e
union: Do not warn about harmless collisions.
Until now we'd get pointless messages like:

  warning: collision encountered:
    /gnu/store/…-gtk-icon-themes/share/icons/hicolor/icon-theme.cache
    /gnu/store/…-inkscape-0.92.3/share/icons/hicolor/icon-theme.cache
  warning: choosing /gnu/store/…-gtk-icon-themes/share/icons/hicolor/icon-theme.cache

* guix/build/union.scm (%harmless-collisions): New variable.
(warn-about-collision): Honor it.
2018-05-17 10:48:37 +02:00
Mark H Weaver 539bf8f2c0
Merge branch 'master' into core-updates 2018-05-17 01:00:50 -04:00
Ludovic Courtès e00ade3fb8
profiles: Optionally use relative file names for symlink targets.
* guix/build/union.scm (symlink-relative): New procedure.
* guix/build/profiles.scm: Re-export it.
(build-profile): Add #:symlink and pass it to 'union-build'.
* guix/profiles.scm (profile-derivation): Add #:relative-symlinks?.
Pass #:symlink to 'build-profile'.
* tests/profiles.scm ("profile-derivation relative symlinks, one entry")
("profile-derivation relative symlinks, two entries"): New tests.
2018-05-10 14:53:57 +02:00
Ludovic Courtès dac1c97d13
union: Add 'relative-file-name'.
* guix/build/union.scm (%not-slash): New variable.
(relative-file-name): New procedure.
* tests/union.scm (test-relative-file-name): New macro and tests.
2018-05-10 14:53:56 +02:00
Danny Milosavljevic 3766aa921b
build-system: android-ndk: Let upstream install header files.
* guix/build/android-ndk-build-system.scm (install): Don't install header
files ourselves.
2018-05-10 01:06:22 +02:00
Danny Milosavljevic 9ed36cd3d6
build-system: android-ndk: Support unit tests.
* guix/build-system/android-ndk.scm (android-ndk-build): Add googletest.
* guix/build/android-ndk-build-system.scm (check): Check whether tests are
enabled.  Run root-level tests as well.
2018-05-10 01:06:22 +02:00
Danny Milosavljevic 436515cdb8
build: Add the Android NDK build-system.
* guix/build-system/android-ndk.scm: New file.
* guix/build/android-ndk-build-system.scm: New file.
* Makefile.am: Add them.
2018-05-09 19:16:04 +02:00
Danny Milosavljevic d6ac4d42ba
guix: ant-build-system: End "configure" phase with #t.
* guix/build/ant-build-system.scm (configure): End with #t.
2018-05-06 20:49:20 +02:00
Danny Milosavljevic bc65332a38
guix: ant-build-system: Create INDEX.LIST.
Fixes <https://bugs.gnu.org/31374>.

* guix/build/ant-build-system.scm (generate-jar-indices): New procedure.
(%standard-phases)[generate-jar-indices]: New phase.
2018-05-06 19:39:54 +02:00
Marius Bakke 12bd588346
Merge branch 'master' into core-updates 2018-05-06 15:56:24 +02:00
Maxim Cournoyer c1b4ad2e6e
build: emacs-utils: Fail when byte compilation fails.
Byte compilation failures were ignored prior to this change.

* guix/build/emacs-utils.scm (emacs-byte-compile-directory): Fail when there
are compilation errors.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2018-05-03 21:48:59 +05:30
Ludovic Courtès 27e810c3e8
compile: Exit when an exception is thrown.
Previously we could end up with only a subset of the modules built.
Fixes <https://bugs.gnu.org/31329>.

* guix/build/compile.scm (call/exit-on-exception): New procedure.
(exit-on-exception): New macro.
(compile-files): Use it.
2018-05-01 16:01:39 +02:00
Marius Bakke a9fe3882b9
Merge branch 'master' into staging 2018-04-25 15:53:41 +02:00
Mark H Weaver c52872bfc4
Merge branch 'master' into core-updates 2018-04-21 05:02:52 -04:00
Maxim Cournoyer facc0a96a1
build-system: emacs: Add improved check phase.
* guix/build-system/emacs.scm (emacs-build): Add #:test-command keyword
argument. Remove #:configure-flags and #:test-target keyword arguments.
* guix/build/emacs-build-system.scm (check): New procedure.
(%standard-phases): Register check phase after the build phase.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2018-04-20 00:49:53 +05:30
Maxim Cournoyer 8a8fa82e72
build-system: emacs: Replace system* with invoke.
* guix/build/emacs-utils.scm: Use (guix build utils) for invoke.
(emacs-batch-eval, emacs-batch-edit-file): Replace system* with invoke.
* guix/build/emacs-build-system.scm (make-autoloads): No need to return #t
explicitly since emacs-generate-autoloads now uses invoke.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2018-04-20 00:49:53 +05:30
Maxim Cournoyer b5904fcc34
build-system: emacs: Search all inputs for Emacs Lisp directories.
* guix/build/emacs-build-system.scm (set-emacs-load-path): Include Emacs Lisp
directories from all inputs. Also, add the unpacked source directory to
EMACSLOADPATH.
(emacs-inputs, emacs-inputs-directories, emacs-input->el-directory,
emacs-inputs-el-directories): Remove.
(%standard-phases): Move set-emacs-load-path phase to after unpack phase.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2018-04-20 00:49:47 +05:30
Marius Bakke 5d904d63f4
Merge branch 'master' into staging 2018-04-16 18:15:28 +02:00
Marius Bakke 538d6d025c
build-system/meson: Don't override LDFLAGS if already set.
* guix/build/meson-build-system.scm (configure): Test for LDFLAGS before
adding ours.

(cherry picked from commit 611c27db2a)
2018-04-15 14:45:56 +02:00
Mark H Weaver f89aa1521a
Merge branch 'master' into core-updates 2018-04-10 00:42:22 -04:00
Ludovic Courtès e40aa54e98
union: Allow callers to choose the collision resolution policy.
* guix/build/union.scm (warn-about-collision): New procedure.
(union-build): Add #:resolve-collision.
[resolve-collisions]: Call it.
* tests/union.scm ("union-build collision first & last"): New test.
2018-04-08 17:41:08 +02:00
Marius Bakke 611c27db2a
build-system/meson: Don't override LDFLAGS if already set.
* guix/build/meson-build-system.scm (configure): Test for LDFLAGS before
adding ours.
2018-04-02 02:22:23 +02:00
Ludovic Courtès f8d1303864
union: Slightly improve messages for file collisions.
* guix/build/union.scm (union-build): Indent file names upon collision.
Remove "arbitrarily" from the message.
2018-03-31 23:30:50 +02:00
Ludovic Courtès d0a2db47fb
ld-wrapper: Allow linking with non-store libraries by default.
This was suggested on several occasions, notably
<https://bugs.gnu.org/24544>.

* gnu/packages/ld-wrapper.in (%allow-impurities?): Default to #t and
parse the value of 'GUIX_LD_WRAPPER_ALLOW_IMPURITIES'.
* guix/build/gnu-build-system.scm (set-paths): Set
'GUIX_LD_WRAPPER_ALLOW_IMPURITIES'.
2018-03-29 17:58:16 +02:00
Ludovic Courtès c90fd42020
gremlin: Fix typo in export list.
* guix/build/gremlin.scm: Really export 'elf-dynamic-info-soname'.
2018-03-29 17:58:15 +02:00
Mark H Weaver ac21be848a
Merge branch 'master' into core-updates 2018-03-20 14:22:06 -04:00
Ludovic Courtès 248871e006
build-system/gnu: Fix typo.
* guix/build/gnu-build-system.scm (dump-file-contents): Fix typo in
'string-pad' argument.
2018-03-20 17:01:41 +01:00
Ludovic Courtès 88b87c352f
build-system/gnu: Dump test suite logs upon 'check' failure.
Suggested by Mark H Weaver <mhw@netris.org>.

* guix/build/gnu-build-system.scm (dump-file-contents): New procedure.
(%test-suite-log-regexp): New variable.
(check): Add #:test-suite-log-regexp.  Catch 'invoke-error?' and call
'dump-file-contents' upon error.
2018-03-20 13:29:37 +01:00
Mark H Weaver 171a117c61
build-system/python: Fix deletion of .egg-info dirs created by tests.
* guix/build/python-build-system.scm (check): Use 'string=?' to compare
strings, not 'eqv?'.
2018-03-18 00:49:05 -04:00
Mark H Weaver 1e62645402
build-system/python: Return #t from all phases.
* guix/build/python-build-system.scm (build, install, wrap): Return #t.
(check): Return #t and remove vestigial plumbing.
2018-03-18 00:49:03 -04:00
Mark H Weaver 99aaeaa00b
build-system/gnu: Tolerate errors during the 'strip' phase.
This is a followup to commit 9a87649c86.

* guix/build/gnu-build-system.scm (strip)[strip-dir]: If an invoke error
occurs, issue a warning and continue to the next file.  This restores the
tolerance of stripping errors prior to commit 9a87649.
2018-03-16 20:02:59 -04:00
Mark H Weaver cbdfa50d9f
utils: invoke: Raise exceptions using SRFI-34 and SRFI-35.
* guix/build/utils.scm (&invoke-error): New condition type.
(invoke-error?, invoke-error-program, invoke-error-arguments)
(invoke-error-exit-status, invoke-error-term-signal)
(invoke-error-stop-signal): New exported procedures.
(invoke): Raise exceptions using SRFI-34 and SRFI-35.
* guix/ui.scm (call-with-error-handling): Add a guard clause
for &invoke-error conditions.
2018-03-16 20:02:47 -04:00
Mark H Weaver d8a3b1b9e8
gnu-build: Issue a warning unless every phase returns #t.
* guix/build/gnu-build-system.scm (gnu-build): Issue a warning if a phase
returns a value other than #t.
2018-03-16 09:08:25 -04:00
Mark H Weaver e9b23fe8bd
build-system/gnu: Return a boolean from all phase procedures.
* guix/build/gnu-build-system.scm (patch-source-shebangs)
(patch-generated-file-shebangs, strip): Return #t.
(validate-runpath): Raise an exception if validation fails.  Never return #f.
2018-03-16 06:44:09 -04:00
Mark H Weaver 7837450076
build: emacs-utils: Use invoke instead of system*.
* guix/build/emacs-utils.scm (emacs-batch-eval)
(emacs-batch-edit-file): Use invoke.
2018-03-16 05:02:38 -04:00
Mark H Weaver 469de8c3fa
hg-download: Use invoke instead of system*.
* guix/build/hg.scm (hg-fetch): Use invoke and remove vestigial plumbing.
2018-03-16 05:02:36 -04:00
Mark H Weaver 81d8211e1b
svn-download: Use invoke instead of system*.
* guix/build/svn.scm (svn-fetch): Use invoke and remove vestigial plumbing.
2018-03-16 05:02:34 -04:00
Mark H Weaver 54fcecdb12
cvs-download: Use invoke instead of system*.
* guix/build/cvs.scm (cvs-fetch): Use invoke and remove vestigial plumbing.
2018-03-16 05:02:32 -04:00
Mark H Weaver 2eeffc0acc
build-system/scons: Use invoke instead of system*.
* guix/build/scons-build-system.scm (build, check, install): Use invoke.
2018-03-16 05:01:57 -04:00
Mark H Weaver 68ca0efa9a
build-system/texlive: Use invoke instead of system*.
* guix/build/texlive-build-system.scm (compile-with-latex): Use invoke.
2018-03-16 05:01:56 -04:00
Mark H Weaver e35b09ca71
build-system/python: Use invoke instead of system*.
* guix/build/python-build-system.scm (call-setuppy): Use invoke.
2018-03-16 05:01:54 -04:00
Mark H Weaver 9e58fd9d7b
build-system/perl: Use invoke instead of system*.
* guix/build/perl-build-system.scm (configure, build, check, install): Use
invoke.
2018-03-16 05:01:52 -04:00
Mark H Weaver 0f308fe8eb
build-system/cmake: Use invoke instead of system*.
* guix/build/cmake-build-system.scm (configure): Use invoke.
2018-03-16 05:01:50 -04:00
Mark H Weaver 09a8f68b11
build-system/glib-or-gtk: Use invoke instead of system*.
* guix/build/glib-or-gtk-build-system.scm (compile-glib-schemas): Use invoke
and remove vestigial plumbing.
2018-03-16 05:01:47 -04:00