Commit Graph

1183 Commits

Author SHA1 Message Date
Mark H Weaver
1bab9b9f17
grafts: Support rewriting UTF-16 and UTF-32 store references.
Partially fixes <https://bugs.gnu.org/33848>.

* guix/build/graft.scm (replace-store-references): Add support for
finding and rewriting UTF-16 and UTF-32 store references.
* tests/grafts.scm: Add tests.
2021-04-15 03:22:55 -04:00
Maxim Cournoyer
fed28a9632
build-system/qt: Fix wrapping with QTWEBENGINEPROCESS_PATH.
This is a follow up commit to 06eb21856f, which added QTWEBENGINEPROCESS_PATH
to the list of wrapped variables.  Unfortunately it wouldn't be set, as its
value is a plain file rather than a directory, and the code only checked for
directories.

* guix/build/qt-build-system.scm (variables-for-wrapping): Define a file type
entry for each variable definition, and use it to determine if we should look
for directories versus plain files.
2021-04-10 00:55:18 -04:00
Ludovic Courtès
06eb21856f
build-system/qt: Wrappers set 'QTWEBENGINEPROCESS_PATH' if needed.
Suggested by Maxim Cournoyer <maxim.cournoyer@gmail.com>.

* guix/build/qt-build-system.scm (variables-for-wrapping): Add
"QTWEBENGINEPROCESS_PATH".
2021-04-08 23:27:55 +02:00
Ludovic Courtès
c5fd1b0bd3
build-system/qt: Wrappers only include relevant directories to XDG_DATA_DIRS.
Fixes <https://bugs.gnu.org/47569>.

Previously the wrapper's XDG_DATA_DIRS would contain any input that had
a /share sub-directory, which is usually all build-time inputs.

* guix/build/qt-build-system.scm (variables-for-wrapping)[collect-sub-dirs]:
Add 'selectors' parameter and honor it.  Change caller to handle
selectors.  Add selectors for /share.
2021-04-08 23:27:41 +02:00
Jelle Licht
23ea84cdf0
build-system: Rewrite node build system.
* guix/build/node-build-system.scm: Rewrite it.
* guix/build-system/node.scm: Adjust accordingly.
* gnu/packages/node-xyz.scm (node-semver): Likewise.

Co-authored-by: Timothy Sample <samplet@ngyro.com>
2021-04-02 18:04:22 +02:00
zimoun
9f7b599037
build-system/julia: Turn on deprecation warnings.
* guix/build/julia-build-system.scm (check): Set option '--depwarn=yes'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-03-29 16:47:18 +02:00
Chris Marusich
c29bfbfc78
syscalls: Fix RNDADDTOENTCNT on powerpc64le-linux.
This fixes the failing test add-to-entropy-count in tests/syscalls.scm on
powerpc64le-linux.

* guix/build/syscalls.scm (RNDADDTOENTCNT): When %host-type starts with
"powerpc64le", set this to #x80045201.  Otherwise, set it to #x40045201 as
before.
2021-03-23 23:19:58 -07:00
Chris Marusich
b57de27d03
syscalls: Fix clone on powerpc64le-linux.
This makes the clone procedure work correctly and fixes some test failures on
powerpc64le-linux, including tests/containers.scm.

* guix/build/syscalls.scm (clone): Add an entry for ppc64le.
2021-03-23 23:19:57 -07:00
Ludovic Courtès
43937666ba
download: 'tls-wrap' treats premature TLS termination as EOF.
This is a backport of Guile commit
076276c4f580368b4106316a77752d69c8f1494a.

* guix/build/download.scm (tls-wrap)[read!]: Wrap 'get-bytevector-n!'
call in 'catch' and handle 'error/premature-termination' GnuTLS errors.
2021-03-19 21:44:36 +01:00
Chris Marusich
341dfe7eda
syscalls: mounts: Fix a matching bug.
On some systems, the columns in /proc/self/mountinfo look like this:

23 28 0:21 / /proc rw,nosuid,nodev,noexec,relatime shared:11 - proc proc rw

Before this change, the mounts procedure was written with the assumption that
the type and source could always be found in columns 8 and 9, respectively.
However, the proc(5) man page explains that there can be zero or more optional
fields starting at column 7 (e.g., "shared:11" above), so this assumption is
false in some situations.

* guix/build/syscalls.scm (mounts): Update the match pattern to use ellipsis
to match zero or more optional fields followed by a single hyphen.  Remove the
trailing ellipsis, since multiple ellipses are not allowed in the same level.
The proc(5) man page indicates that there are no additional columns, so it is
probably OK to match an exact number of columns at the end like this.
2021-03-15 21:22:43 -07:00
Efraim Flashner
78e7e178a3
build-system/cargo: Don't clobber packaged crates while building.
This fixes an issue where two packages share a common dependent.

* guix/build/cargo-build-system.scm (unpack-rust-crates): Only copy rust
crates into the target directory if there isn't one already there with
the same name.
2021-03-15 15:53:11 +02:00
Efraim Flashner
4d00185d66
build-system/cargo: Propagate crates across builds.
* guix/build-system/cargo.scm (cargo-build): Add cargo-package-flags,
install-source flags.
* guix/build/cargo-build-system.scm (unpack-rust-crates, package): New
procedures.
(install): Also install crate sources.
(%standard-phases): Add new phases.
* doc/guix.texi (Packaging-guidelines)[Rust Crates]: Adjust to changes
in the cargo-build-system.
2021-03-14 19:52:44 +02:00
Ludovic Courtès
b168acae2a
download: 'tls-wrap' returns an unbuffered custom port.
Partly fixes <https://bugs.gnu.org/46967>.

* guix/build/download.scm (tls-wrap)[unbuffered]: New procedure.
Pass the result of 'make-custom-binary-input/output-port' to
'unbuffered'.
2021-03-11 23:19:52 +01:00
Ludovic Courtès
279d932b1c
download: 'tls-wrap' avoids intermediate buffer.
* guix/build/download.scm (tls-wrap)[read!]: Read straight into BV
instead of calling 'get-bytevector-some' and 'unget-bytevector'.
2021-03-11 23:19:52 +01:00
Ludovic Courtès
9a6ea2f8dc
syscalls: Define the ST_* constants and add 'statfs-flags->mount-flags'.
* guix/build/syscalls.scm (linux?): New variable.
(define-statfs-flags): New macro.
(ST_RDONLY, ST_NOSUID, ST_NODEV, ST_NOEXEC, ST_SYNCHRONOUS)
(ST_MANDLOCK, ST_WRITE, ST_APPEND, ST_IMMUTABLE, ST_NOATIME)
(ST_NODIRATIME, ST_RELATIME): New variables.
(statfs-flags->mount-flags): New procedure.
2021-03-10 23:21:33 +01:00
Ludovic Courtès
7e9d9f28e9
syscalls: Add 'mounts' and the <mount> record type.
* guix/build/syscalls.scm (<mount>): New record type.
(option-string->mount-flags, mount-flags)
(octal-decode, mounts): New procedures.
(mount-points): Rewrite in terms of 'mount'.
* tests/syscalls.scm ("mounts"): New test.
2021-02-25 11:29:35 +01:00
Ludovic Courtès
46bb1a41ae
syscalls: Define MS_RELATIME.
* guix/build/syscalls.scm (MS_RELATIME): New variable.
2021-02-25 11:29:35 +01:00
Leo Prikler
a1fd8f01b2
guix: renpy-build-system: Quote data directory.
This prevents generated launchers and desktop files from inadvertently
crashing if the directory name contains a space.

* gnu/build/renpy-build-system.scm (install, install-desktop-file): Use ~s
to format data directory.
2021-02-24 00:37:37 +01:00
Ludovic Courtès
e8fc373900
profiles: Fix typo in manifest comment.
* guix/build/profiles.scm (build-profile): Fix typo.
2021-02-22 23:42:08 +01:00
Leo Prikler
e1bdab4f0f
build-system: Add renpy-build-system.
* guix/build/renpy-build-system.scm: New file.
* guix/build-system/renpy.scm: New file.
* Makefile.am (MODULES): Add them here.
* doc/guix.texi (Build Systems): Document renpy-build-system.
2021-02-07 15:17:55 +01:00
Ludovic Courtès
9fd7b050e2
guix package: Add '--export-manifest'.
* guix/scripts/package.scm (export-manifest): New procedure.
(show-help, %options): Add '--export-manifest'.
(process-query): Honor it.
* guix/build/profiles.scm (build-profile): Mention it.
* tests/guix-package.sh: Test it.
* doc/guix.texi (Invoking guix package): Document it.
2021-02-01 17:32:35 +01:00
nixo
ba093a6d27
build-system/julia: Don't rely on file name to set module name.
* guix/build/julia-build-system.scm (project.toml->name): New procedure.
  (precompile, check, julia-build): Accept new key argument #:julia-package-name.
* guix/build-system/julia.scm (julia-build): ... add it.
* doc/guix.texi (julia-build-system): Update julia-package-name accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-01-30 15:36:56 +01:00
nixo
a23b384f3f
build-system/julia: Enable tests.
* guix/build-system/julia.scm (julia-build): Set tests? default to #t.
* guix/build/julia-build-system.scm (check): Respect tests? and fix julia
  invocation.
  (%standard-phases): Add check phase after install.
* doc/guix.texi (julia-build-system): Update accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-01-30 15:36:56 +01:00
Zhu Zihao
5f6216d551
build-system/cargo: Use argument "--no-track" in "cargo install".
* guix/build/cargo-build-system(install):
Add argument "--no-track" in "cargo install".
Remove stale hack.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2020-12-31 14:42:15 +02:00
Ludovic Courtès
cd6c5ddfc8
guix system: 'init' copies, resets timestamps, and deduplicates at once.
Partly fixes <https://bugs.gnu.org/44760>.

* guix/build/store-copy.scm (copy-store-item): New procedure.
(populate-store): Use it instead of the inline 'copy-recursively' call.
* guix/scripts/system.scm (copy-item): Likewise.
Pass #:reset-timestamps? and #:deduplicate? to 'register-path'.
2020-12-15 17:32:11 +01:00
Ludovic Courtès
6a060ff27f
store-copy: 'populate-store' can optionally deduplicate files.
Until now deduplication was performed as an additional pass after
copying files, which involve re-traversing all the files that had just
been copied.

* guix/store/deduplication.scm (copy-file/deduplicate): New procedure.
* tests/store-deduplication.scm ("copy-file/deduplicate"): New test.
* guix/build/store-copy.scm (populate-store): Add #:deduplicate?
parameter and honor it.
* tests/gexp.scm ("gexp->derivation, store copy"): Pass #:deduplicate? #f
to 'populate-store'.
* gnu/build/image.scm (initialize-root-partition): Pass #:deduplicate?
to 'populate-store'.  Pass #:deduplicate? #f to 'register-closure'.
* gnu/build/vm.scm (root-partition-initializer): Likewise.
* gnu/build/install.scm (populate-single-profile-directory): Pass
 #:deduplicate? #f to 'populate-store'.
* gnu/build/linux-initrd.scm (build-initrd): Likewise.
* guix/scripts/pack.scm (self-contained-tarball)[import-module?]: New
procedure.
[build]: Pass it as an argument to 'source-module-closure'.
* guix/scripts/pack.scm (squashfs-image)[build]: Wrap in
'with-extensions'.
* gnu/system/linux-initrd.scm (expression->initrd)[import-module?]: New
procedure.
[builder]: Pass it to 'source-module-closure'.
* gnu/system/install.scm (cow-store-service-type)[import-module?]: New
procedure.  Pass it to 'source-module-closure'.
2020-12-15 17:32:10 +01:00
Ludovic Courtès
7b8d239ec2
store-copy: 'populate-store' resets timestamps.
Until now, 'populate-store' would reset permissions but not timestamps,
so callers would resort to going through an extra directory traversal to
reset timestamps.

* guix/build/store-copy.scm (reset-permissions): Remove.
(copy-recursively): New procedure.
(populate-store): Pass #:keep-permissions? to 'copy-recursively'.
Remove call to 'reset-permissions'.
* tests/gexp.scm ("gexp->derivation, store copy"): In BUILD-DRV, check
whether 'populate-store' canonicalizes permissions and timestamps.
* gnu/build/image.scm (initialize-root-partition): Pass #:reset-timestamps? #f
to 'register-closure'.
* gnu/build/vm.scm (root-partition-initializer): Likewise.
2020-12-15 17:32:10 +01:00
raingloom
64f032d73f
build-system: Add chicken-build-system.
* guix/build-system/chicken.scm: New file.
* guix/build/chicken-build-system.scm: New file.
* Makefile.am: Add them.
* doc/guix.texi: Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-12-03 16:18:33 +01:00
Marius Bakke
a485a98ca8
Merge branch 'master' into staging 2020-11-22 23:36:09 +01:00
Efraim Flashner
1ca0c34867
build-system/cargo: Set gettext environment variable when available.
* guix/build/cargo-build-system.scm (configure): When gettext is
available in the build environment set the GETTEXT_SYSTEM variable.
* gnu/packages/crates-io.scm (rust-gettext-rs-0.5, rust-gettext-rs-0.4,
rust-gettext-sys-0.19)[arguments]: Remove phase to help find system gettext.
2020-11-22 19:45:43 +02:00
Efraim Flashner
73dbcc4b5f
build-system/cargo: Set libclang environment variable when available.
* guix/build/cargo-build-system.scm (configure): When clang is available
in the build environment set the LIBCLANG_PATH variable.
* gnu/packages/crates-graphics.scm (rust-aom-sys-0.1,
uust-dav1d-sys-0.3),
* gnu/packages/crates-io.scm (rust-bindgen-0.55, rust-bindgen-0.54,
rust-bindgen-0.53, rust-bindgen-0.52, rust-cexpr-0.4, rust-cexpr-0.3,
rust-cexpr-0.2, rust-clang-sys-1, rust-clang-sys-0.29,
rust-clang-sys-0.26, rust-clang-sys-0.22, rust-clang-sys-0.11,
rust-libpijul-0.12, rust-nettle-7, rust-nettle-sys-2,
rust-sequoia-openpgp-0.9)[arguments]: Remove phases which set an
environment variable to find clang.
[inputs]: Rename instances of libclang with clang.
2020-11-22 19:44:53 +02:00
Efraim Flashner
3dbf3a7f51
build-system/cargo: Set openssl environment variable when available.
* guix/build/cargo-build-system.scm (configure): When openssl is
available set the OPENSSL_DIR variable to discover its location.
* gnu/packages/crates-io.scm (rust-curl-sys-0.4, rust-libgit2-sys-0.10,
rust-libpijul-0.12, rust-libssh2-sys-0.2, rust-native-tls-0.2,
rust-openssl-sys-0.9, rust-openssl-0.7, rust-trust-dns-rustls-0.6),
* gnu/packages/rust-apps.scm (tokei, exa)[arguments]: Remove redundant
setenv for openssl.
2020-11-22 19:44:43 +02:00
Marius Bakke
be8a0881f1
build-system/cargo: Do not pass --features to Cargo unless specified.
Fixes <https://bugs.gnu.org/44692>.

* guix/build/cargo-build-system.scm (build): Default to the empty list for
FEATURES.  Check whether the list is empty when building the Cargo arguments.
2020-11-20 09:58:04 +01:00
Marius Bakke
32787d6524
Merge branch 'master' into staging
Conflicts:
	gnu/local.mk
	gnu/packages/gdb.scm
	gnu/packages/lisp-xyz.scm
	gnu/packages/web-browsers.scm
2020-11-07 21:33:32 +01:00
Vagrant Cascadian
159c5943e4
build/maven: Fix typo.
* guix/build/maven/pom: Fix spelling of "with".
2020-10-28 21:11:11 -07:00
Vagrant Cascadian
28680722b2
build/maven: fix-pom-dependencies: Fix typo.
* guix/build/maven/pom (fix-pom-dependencies): Fix spelling of "overrides".
2020-10-28 21:11:06 -07:00
Vagrant Cascadian
05ee7ef8b7
build/maven: fix-pom-dependencies: Fix typo.
* guix/build/maven/pom (fix-pom-dependencies): Fix spelling of "overridden".
2020-10-28 21:11:01 -07:00
Björn Höfling
f503cfc9c5
build/maven-build-system: Return #t in fix-pom-files phase.
* guix/build/maven-build-system.scm (fix-pom-files): Return #t.
2020-10-26 21:36:09 +01:00
Marius Bakke
1a8f7a0f58
Merge branch 'master' into staging 2020-10-19 00:17:48 +02:00
Efraim Flashner
6b793fa662
build-system/go: Install license files.
* guix/build/go-build-system.scm (install-license-files): New procedure.
(%standard-phases): Replace inherited 'install-license-files phase.
2020-10-15 11:13:25 +03:00
Marius Bakke
f7175626ff
Merge branch 'master' into staging 2020-10-13 23:39:27 +02:00
Ludovic Courtès
b55409b2c0
svn-download, hg-download: Use 'report-invoke-error'.
* guix/build/hg.scm (hg-fetch): Use 'report-invoke-error' instead of
'format'.
* guix/build/svn.scm (svn-fetch): Likewise.
2020-10-10 22:37:45 +02:00
zimoun
db9e4af0ea
build: svn: Fix handle fetch errors.
This fixes the revert 1ec67d5220.

* guix/build/svn.scm (svn-fetch): Add 'guard' to handle errors.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2020-10-08 12:38:43 +02:00
Paul Garlick
1ec67d5220
Revert "build: svn: Handle fetch errors."
This reverts commit 2fb12dd1bb, which
causes the 'svn export' command to fail with:

svn: E155000: Destination directory exists; please remove the directory
or use --force to overwrite
2020-10-06 14:47:57 +01:00
zimoun
2fb12dd1bb
build: svn: Handle fetch errors.
* guix/build/svn.scm (svn-fetch): Add 'guard' to handle errors.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2020-10-06 10:24:38 +02:00
zimoun
a5a3f813c7
build: hg: Handle fetch errors.
* guix/build/hg.scm (hg-fetch): Add 'guard' to handle errors.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2020-10-06 10:24:37 +02:00
Efraim Flashner
c1cc0c4865
build-system/cargo: Don't install .crates.toml file.
Fixes <https://issues.guix.gnu.org/43810>.

* guix/build/cargo-build-system.scm (install): Remove installed
.crates.toml file.
2020-10-06 10:37:34 +03:00
Guillaume Le Vaillant
2374443561
Merge branch 'staging' into wip-lisp 2020-09-23 14:50:19 +02:00
Guillaume Le Vaillant
e0d9103f41
build-system: asdf: Improve install phase for CL source packages.
* guix/build/asdf-build-system.scm (install)[parent-source]: Add support for
  package names not containing a hyphen.
2020-09-15 22:00:29 +02:00
Guillaume Le Vaillant
952fafb2a3
build-system: asdf: Read all .asd files if no #:asd-files specified.
* guix/build-system/asdf.scm (asdf-build): Remove the 'files' variable.
* guix/build/asd-build-system.scm (find-asd-files): New variable.
  (build, check): Use it.
2020-09-15 14:36:24 +02:00