Commit Graph

1407 Commits

Author SHA1 Message Date
Efraim Flashner
408a4ed071
build-system/cargo: Unpack crates less verbosely.
* guix/build/cargo-build-system.scm (configure): Print the crate being
unpacked but don't print the contents of each crate.
2022-10-20 12:23:52 +03:00
Liliana Marie Prikler
8b809a31fa
guix: emacs-utils: Support disabling native-compilation.
* guix/build/emacs-utils.scm (emacs-batch-disable-compilation): Add ‘native?’
argument and honour it.
2022-10-14 20:41:33 +02:00
Nicolas Goaziou
00fa377710
build: emacs-utils: Fix `emacs-substitute-variables'.
* guix/build/emacs-utils.scm (emacs-substitute-variables): Fix the regexp
matching variable name.

With end-of-word regexp ("\>"), the previous regexp may match the prefix of
a variable only, effectively deleting the rest of its name.

For example,

  (emacs-substitute-variables "file.el"
    ("foo" ...))

could match (defvar foo-bar ...) and replace it with (defvar foo ...).
2022-10-13 22:16:32 +02:00
jgart
172207924e
debug-link: Clarify what CRC is.
* guix/build/debug-link.scm: Clarify "CRC"; update bug URL.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-26 23:29:37 +02:00
Morgan Smith
58d0453aa7
build-system: emacs: Use new function for autoloads generation
* guix/build/emacs-utils.scm (emacs-generate-autoloads): Use
'loaddefs-generate' to create autoloads instead of
'update-directory-autoloads' if we are using a new enough Emacs

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2022-09-11 15:46:32 +02:00
Liliana Marie Prikler
630c9b6e01
build-system: emacs: Use native compilation.
* guix/build/emacs-build-system.scm (add-install-to-native-load-path):
New variable.
(build): Replace ‘emacs-byte-compile-directory’ with ‘emacs-compile-directory’.
Delete already compiled files in the working directory prior to compilation.
(%standard-phases): Add ‘add-install-to-native-load-path’ after
‘expand-load-path’.
2022-09-11 15:46:32 +02:00
Liliana Marie Prikler
b54724b2ac
guix: emacs-utils: Add emacs-compile-directory.
* guix/build/emacs-utils.scm (emacs-compile-directory): New variable.
2022-09-11 15:46:32 +02:00
Ludovic Courtès
8f53630f2f
syscalls: Avoid repeated calls to 'syscall->procedure'.
Commit 7df4d3465d and others changed
'mount', 'umount', & co. so they would call 'syscall->procedure' at each
call.  This change reverts to the previous behavior, where
'syscall->procedure' is called once.

* guix/build/syscalls.scm (mount, umount, reboot, load-linux-module):
Call 'syscall->procedure' only once.
2022-09-08 16:22:21 +02:00
(unmatched-parenthesis
bbc1735be2
profiles: Implicitly set GUIX_EXTENSIONS_PATH.
* guix/build/profiles.scm (manifest-sexp->inputs+search-paths):
Always return a search path for GUIX_EXTENSIONS_PATH.
* guix/search-paths.scm ($GUIX_EXTENSIONS_PATH): New variable.

This allows Guix to find extensions without any need for users to
set GUIX_EXTENSIONS_PATH manually.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2022-09-07 11:30:31 +03:00
Oleg Pykhalov
4b49487838
gnu: system: file-systems: Add shared flag.
* gnu/build/file-systems.scm (mount-flags->bit-mask, mount-file-system):
Handle shared flag.
* gnu/system/file-systems.scm (invalid-file-system-flags): Add shared to known
flags.
* guix/build/syscalls.scm (MS_SHARED): New variable.
* doc/guix.texi (File Systems): Document shared flag.
2022-08-10 07:12:25 +03:00
Maxim Cournoyer
a956c7df87
build: qt-utils: Fix another regression.
This fixes another regression introduced with
1f466ed6be, which affected the packages bitmask,
hime, hime, nimf and vorta.

The fix is to provide a default qt-major-version when #:qtbase is missing,
such as when borrowing the qt-wrap phase in a package not using the Qt build
system.

* guix/build/qt-utils.scm (wrap-all-qt-programs)[qt-major-version]: Fall-back
to %default-qt-major-version when #:qtbase is #f.

Reported-by: John Kehayias <john.kehayias@protonmail.com> and others.
2022-08-04 12:06:17 -04:00
Ludovic Courtès
dd573ceea7
download: Do not wrap TLS port on GnuTLS >= 3.7.7.
The custom input/output port wrapping the TLS session record port would
introduce overhead, and it would also prevent its uses in a non-blocking
context--e.g., with Fibers.  The port close mechanism added in GnuTLS
3.7.7 allows us to get rid of that wrapper.

* guix/build/download.scm (wrap-record-port-for-gnutls<3.7.7): New
procedure, with code formerly in 'tls-wrap'.
(tls-wrap): Check for 'set-session-record-port-close!' and use it when
available; otherwise call 'wrap-record-port-for-gnutls<3.7.7'.
2022-08-03 17:43:29 +02:00
Guillaume Le Vaillant
c232375340
build-system: asdf: Add asd-operation parameter.
The 'asd-operation' parameter can be used to specify the ASDF operation to use
in the build phase. It's default value is "load-system".

* guix/build-system/asdf.scm (package-with-build-system, asdf-build): Add
  'asd-operation' parameter.
* guix/build/asdf-buid-system.scm (build): Add 'asd-operation' parameter and
  use it.
* guix/build/lisp-utils.scm (compile-systems): Add 'asd-operation' parameter
  and use it.
2022-08-03 16:45:54 +02:00
Pierre Neidhardt
6181f1f263
build-system: asdf: Let ASDF locate the .asd files.
This approach has many benefits:

- It simplifies the build system.
- The package definitions are easier to write.
- It fixes a bug with systems that call asdf:clear-system which would cause
  the load to fail. See for instance test systems using Prove.

* guix/build-system/asdf.scm (package-with-build-system): Remove 'asd-files'
  and replace 'test-asd-file' by 'asd-test-systems'.
  (lower): Same.
* guix/build/asdf-build-system.scm (source-asd-file): Remove since ASDF does
  it better than us.
  (find-asd-files): Same.
  (build): Remove unused asd-files argument.
  (check): Remove asd-files argument and replace asd-systems by
  asd-test-systems.
* guix/build/lisp-utils.scm (compile-systems): Call to ASDF to find the
  systems.
  (test-system): Same.

Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
2022-08-03 16:45:53 +02:00
Pierre Neidhardt
6b5ef03a25
guix: build: Switch from asdf:compile-system to asdf:load-system.
According to the ASDF manual:

This will make sure all the files in the system are compiled, but not
necessarily load any of them in the current image; on most systems, it
will _not_ load all compiled files in the current image.  This function
exists for symmetry with 'load-system' but is not recommended unless you
are writing build scripts and know what you're doing.

* guix/build/lisp-utils.scm (compile-systems): Switch from asdf:compile-system
  to asdf:load-system.

Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
2022-08-03 16:45:53 +02:00
Ludovic Courtès
cce7427f95
download: 'url-fetch' closes its HTTP/HTTPS port.
* guix/build/download.scm (url-fetch)[fetch]: In the http/https case,
close PORT before returning.
2022-08-01 14:08:07 +02:00
Maxim Cournoyer
1f466ed6be
build: qt: Add qtbase argument and wrap Qt environment variables exactly.
* guix/build-system/qt.scm (default-qtbase): New variable.
(lower) <#:qtbase>: Add argument...
[build-inputs]: ... and propagate it here.
(qt-build): Add qtbase argument.
(qt-cross-build): Likewise.
* guix/build/qt-utils.scm (%default-qt-major-version): New variable.
(variables-for-wrapping): Add qt-major-version argument, and use it to format
the various path prefixes.  Wrap QT environment variables exactly.
(wrap-qt-program*): Add qt-major-version argument, and pass it to
variables-for-wrapping.
(wrap-qt-program): Add qt-major-version argument, and pass it to
wrap-qt-program*.
(wrap-all-qt-programs): Add qtbase argument, and extract the major version
from it, passing it to wrap-qt-program*.
2022-07-31 21:55:49 -04:00
r0man
af7dd52136
gnu: clojure: Update to 1.11.1.
This patch updates Clojure to 1.11.1. It also adds the 'reset-class-timestamps
phase to the Clojure build system.

This phase makes sure the timestamp of compiled class files is set to a later
point in time than the timestamp of the corresponding Clojure source files. If
the timestamps of the class and source files are the same, the Clojure
compiler will compile the sources again which can lead to issues. This problem
has been discussed here [1]. The suggested solution was to keep/adjust the
timestamps of the class files.

[1] https://www.mail-archive.com/clojure@googlegroups.com/msg99928.html

* gnu/packages/clojure.scm (clojure): Update to 1.11.1 and update all of
LIBRARIES accordingly.
[arguments]: In 'unpack-library-sources' phase, copy from
"core-specs-alpha-src" and "spec-alpha-src" as well.  Add
phases 'closure-spec-skip-macros', 'clojure-spec-compile',
'maven-classpath-properties', and 'reset-class-timestamps'.
* guix/build/clojure-build-system.scm (regular-jar-file?)
(reset-class-timestamps): New procedures.
(%standard-phases): Add 'reset-class-timestamps' phase.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2022-07-23 00:39:56 +02:00
Ludovic Courtès
89e2288751
profiles: Support the creation of profiles with version 3 manifests.
* guix/profiles.scm (%manifest-format-version): New variable.
(manifest->gexp): Add optional 'format-version' parameter.
[optional, entry->gexp]: Honor it.
(profile-derivation): Add #:format-version parameter and honor it.
(<profile>)[format-version]: New field.
(profile-compiler): Honor it.
* guix/build/profiles.scm (manifest-sexp->inputs+search-paths): Support
both versions 3 and 4.  Remove unused 'properties' variable.
* tests/profiles.scm ("profile-derivation format version 3"): New test.
2022-07-08 23:58:11 +02:00
Ludovic Courtès
4ff12d1de7
profiles: Do not repeat entries in 'manifest' file.
Fixes <https://issues.guix.gnu.org/55499>.
Reported by Ricardo Wurmus <rekado@elephly.net>.

With this change, the manifest file created for:

  guix install r r-seurat r-cistopic r-monocle3 r-cicero-monocle3 r-assertthat

goes from 5.7M to 176K.  Likewise, on this profile, wall-clock time of:

  GUIX_PROFILING=gc guix package -I

goes from 0.7s to 0.1s, with heap usage going from 55M to 9M.

* guix/profiles.scm (manifest->gexp)[optional]: New procedure.
[entry->gexp]: Turn into a monadic procedure.  Return a 'repeated' sexp
if ENTRY was already visited before.
Adjust caller accordingly.  Bump manifest version.
(sexp->manifest)[sexp->manifest-entry]: Turn into a monadic procedure.
Add case for 'repeated' nodes.  Add each entry to the current state
vhash.
Add clause for version 4 manifests.
[sexp->manifest-entry/v3]: New procedure, with former
'sexp->manifest-entry' code.
* tests/profiles.scm ("deduplication of repeated entries"): New test.
* guix/build/profiles.scm (manifest-sexp->inputs+search-paths)[let-fields]:
New macro.
Use it.  Expect version 4.  Add clause for 'repeated' nodes.
2022-07-01 23:29:16 +02:00
(
30edb241a9
build-system/dub: Don't expect ‘.dub/dub.json’.
This file is no longer produced by our version of Dub.

* guix/build/dub-build-system.scm (build, check): Remove obsolete
substitutions.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2022-06-19 02:00:00 +02:00
(
ba95bbbac5
build-system/dub: Fix configure docstring indentation.
* guix/build/dub-build-system.scm (configure): Reflow docstring.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2022-06-19 02:00:00 +02:00
(
c539a13050
build-system/dub: Don't explicitly return #t from phases.
* guix/build/dub-build-system.scm (configure, build, check, install):
Remove trailing #t.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2022-06-19 02:00:00 +02:00
Michal Atlas
4dbe1c96e4
build-system: chicken: Add version information to eggs if missing.
Chicken eggs do not always contain version information, yet dependant packages
often rely on this information being present.  Thus, add a version field if it
is missing.

* guix/build/chicken-build-system.scm (stamp-egg-version): New variable.
(%standard-phases): Add ‘stamp-egg-version’.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2022-06-21 21:41:32 +02:00
Fredrik Salomonsson
c3afbd05bf
guix: emacs-utils: Add emacs-header-parse.
* guix/build/emacs-utils.scm (emacs-header-parse): New procedure.

* tests/build-emacs-utils.scm ("emacs-header-parse: fetch version",
  "emacs-header-parse: fetch keywords", "emacs-header-parse: fetch
  nonexistent author"): New tests.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-06-17 23:39:32 +02:00
Fredrik Salomonsson
f8275916fc
guix: emacs-utils: Add emacs-batch-script.
* guix/build/emacs-utils.scm (emacs-batch-script): New procedure.

* tests/build-emacs-utils.scm: New file.

* Makefile.am (TESTS): Add `tests/build-emacs-utils.scm'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-06-17 23:39:31 +02:00
Liliana Marie Prikler
956f0b4465
guix: Modernize renpy-build-system.
* guix/build-system/renpy.scm (build): Drop trailing #t.
(install, install-desktop-file): Likewise.  Also add inputs and use
search-input-file for /bin/sh and /bin/renpy.
2022-06-17 18:49:06 +02:00
Hartmut Goebel
97586ca1cb
build-system: Add 'rebar-build-system'.
* guix/build-system/rebar.scm, guix/build/rebar-build-system.scm: New files.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Update rebar-build-system section.
2022-06-15 10:17:25 +02:00
Maxim Cournoyer
be672f1f7f
gnu: bazaar: Obsolete with breezy.
* gnu/packages/version-control.scm (bazaar): Deprecate package.
* guix/build/bzr.scm (bzr-fetch): Adjust to use breezy; delete trailing #t.
* guix/bzr-download.scm (bzr-package): Replace bazaar by breezy.
2022-05-31 14:54:02 -04:00
Philip McGrath
aefcfdd0ae
guix: Add elm-build-system.
* gnu/packages/patches/elm-offline-package-registry.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/elm.scm (elm): Use it.
* guix/build-system/elm.scm, guix/build/elm-build-system.scm,
tests/elm.scm: New files.
* Makefile.scm (MODULES, SCM_TESTS): Add them.
* doc/guix.texi (Build Systems): Document 'elm-build-system'.
* doc/contributing.texi (Elm Packages): New section. Document naming
conventions and utilities.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-05-22 01:07:51 +02:00
Maxim Cournoyer
360e2eb3ac
build: emacs-utils: Add a (as-display) subform to `emacs-substitute-variables'.
* guix/build/emacs-utils.scm (as-display): New variable.
(replacement-helper): New syntax helper.
(emacs-substitute-sexps): Use it and update doc.
(emacs-substitute-variables): Add an optional 'modifier' datum to the
replacement specification, and document it.
2022-04-04 00:06:31 -04:00
Ludovic Courtès
f1c18e1766
download: Fix typo in procedure name.
* guix/build/download.scm (make-credendials-with-ca-trust-files): Rename
to...
(make-credentials-with-ca-trust-files): ... this.
2022-03-03 23:57:01 +01:00
Ludovic Courtès
c1a871a166
download: Load X.509 certificates only once.
Previously we'd load /etc/ssl/certs/*.pem (or similar) every time
'http-fetch' is called.

* guix/build/download.scm (make-credendials-with-ca-trust-files): Wrap
in 'mlambda'.
2022-03-03 23:57:00 +01:00
Ludovic Courtès
b4acb39b6b
download: Remove obsolete bit from docstring.
This is a followup to f4cde9ac4a.

* guix/build/download.scm (open-connection-for-uri): Remove bit about
'close-connection' from the docstring.
2022-03-03 23:57:00 +01:00
zimoun
1f6ae9a8e0
build: julia-build-system: Fix corner-case for parallel tests.
* guix/build/julia-build-system.scm (check): Do not run parallel tests when
'--cores=1'.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2022-02-24 12:20:32 +02:00
Efraim Flashner
05d469ab9d
build: julia: Add 'julia-package-dependencies' as keyword.
* guix/build-system/julia.scm (link-depot): Accept julia-package-dependencies
keyword and use it for 'julia-create-package-toml' function.
(julia-create-package-toml): Use pattern matching.
(julia-build): Add 'julia-pacakge-dependencies'.
* guix/build/julia-build-system.scm (julia-build): Add
'#:julia-package-dependencies' keyword.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2022-02-24 12:20:31 +02:00
Maxim Cournoyer
dde03913b3
build: Fix typo in file-size docstring.
* guix/build/store-copy.scm (file-size): Fix typo.
2022-02-07 16:22:37 -05:00
Julien Lepiller
fb1a9c11e5
guix: maven: Fix java parser.
* guix/build/maven/java.scm (comment, comment-chr): Support more comment
styles.
2022-02-05 20:16:32 +01:00
Andrew Tropin
f38697f5f8
build-system: emacs: Ensure that package descriptions are generated.
This patch addresses the second part of <https://bugs.gnu.org/48331>.
While existing -pkg.el files were previously installed, no such files
were generated for packages lacking them, resulting in packages not
being listed as installed and not being available towards
“describe-package”.

* guix/build/emacs-build-system.scm (find-root-library-file)
(ensure-package-description): New variables.
(%standard-phases): Add ‘ensure-package-description’.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2022-01-29 08:45:06 +01:00
Reily Siegel
0f2df54f83
build-system/clojure: Support compiling Java.
* guix/build/clojure-build-system.scm (compile-java): New variable.
(build): Copy classes compiled from Java and optionally Java sources to
the final jar.
(%standard-phases): Add compile-java phase before build.
* guix/build/clojure-utils.scm (%java-source-dirs): New variable.
(%java-compile-dir): New variable.
* guix/build-system/clojure.scm (clojure-build): Include %java-source-dirs and
%java-compile-dir.
(builder): Include %java-source-dirs and %java-compile-dir.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-24 10:38:14 +01:00
Reily Siegel
09b4d74bd3
build-system/clojure: Exit with non-zero if tests fail.
* guix/build/clojure-build-system.scm (check): Exit test process with a
non-zero exit code if tests fail.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-24 10:38:14 +01:00
Ludovic Courtès
97a6b4581a
compile: Really disable cross-module inlining and related features.
This is a followup to d87a1ba6b8.

* guix/build/compile.scm (strip-keyword-arguments): Rename to...
(clear-keyword-arguments): ... this, and set the value associated with
each of KEYWORDS to #f.
(optimizations-for-level): Adjust accordingly.
2022-01-23 23:03:33 +01:00
Maxim Cournoyer
276f40fdc3
Merge branch 'version-1.4.0'
With resolved conflicts in:
	gnu/packages/gnome.scm
	gnu/packages/openstack.scm
	gnu/packages/python-xyz.scm
2022-01-17 11:47:09 -05:00
Sarah Morgensen
0f71f55a60
build-system/gnu: Make gzip files writable before resetting timestamps.
guix/build/gnu-build-system.scm (reset-gzip-timestamps): Ensure gzip
files are writable before resetting their timestamps.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-01-10 11:44:47 -05:00
Brendan Tildesley
7f8a896c5f
utils: Fix wrap-script argument handling.
* guix/build/utils.scm (wrap-script):
Don't add (car cl) one too many times, cl its self contains it's car.
Split the aguments string with string-tokenize to avoid leaving an empty
string argument when there should be none. These two bugs seemed to
be partially cancelling each other out so that scripts still worked when
ran with no arguments.

* tests/build-utils.scm: Adjust wrap-script to above changes.
Add two tests to ensure the command line arguments appear identical to a
script and its wrapped version.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-01-10 11:44:29 -05:00
zimoun
a2010ac21b
build: julia-build-system: Create 'Project.toml' file when missing.
* guix/build/julia-build-system.scm (link-depot): Create 'Project.toml' file
when missing using data provided by the user.
(julia-create-package-toml): Remove from export.
* doc/guix.texi (Build Systems): Update julia-build-system section.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2022-01-10 15:15:31 +02:00
Philip McGrath
a62e6e3220
guix: node-build-system: Add 'delete-dependencies' helper function.
Many node packages currently skip the configure phase, because they lack
both dependencies and a convenient way to build without all of them, e.g.
for the purposes of bootstrapping.  This patch adds a big hammer to flatten
these nails.

* guix/build/node-build-system.scm (delete-dependencies): New variable.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2022-01-09 02:07:12 +01:00
Philip McGrath
df7d787ba4
guix: node-build-system: Add avoid-node-gyp-rebuild phase.
Packages with native addons currently try to write to store paths
when used as dependecies.  This patch adds a phase to replace that
behaviour with a no-op.

* guix/build/node-build-system.scm (avoid-node-gyp-rebuild): New
variable.
(%standard-phases): Add 'avoid-node-gyp-rebuild' after 'install'.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2022-01-09 02:07:11 +01:00
Philip McGrath
2ef3fe9f35
guix: node-build-system: Add JSON utilities.
This commit adds several utility functions for non-destructive
transformation of the JSON representation used by (guix build json),
particularly for purely functional update of JSON objects.  They ought
to eventually be exported from their own module, but for now are kept
private to allow experimentation.

* guix/build/node-build-system.scm (assoc-ref*, jsobject-ref, alist-pop)
(alist-update, jsobject-update*, jsobject-union): New variables.
(with-atomic-json-file-replacement): New public variable.
(module-name, build, patch-dependencies): Use them.  Do not resort to
unsafe alist primitives from Guile core.

Co-authored-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2022-01-09 02:07:11 +01:00
Philip McGrath
5add4af6fc
guix: node-build-system: Add delete-lockfiles phase.
Guix does not use any of these lock files to determine the package versions
used during the build, so they only serve to cause problems.

* guix/build/node-build-system.scm (delete-lockfiles): New variable.
(%standard-phases): Add 'delete-lockfiles' after 'patch-dependencies'.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2022-01-09 02:07:10 +01:00