Commit Graph

1384 Commits

Author SHA1 Message Date
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
Ludovic Courtès
d87a1ba6b8
compile: Disable cross-module inlining and related features.
This makes no difference on Guile <= 3.0.7.

* guix/build/compile.scm (strip-keyword-arguments): New procedure.
(optimizations-for-level): Use it to strip keywords related to
cross-module inlining.
2022-01-14 22:39:24 +01:00
Reily Siegel
4b770d3adf
build: clojure-utils: Don't try to compile Clojure.
* guix/build/clojure-utils.scm (%aot-include): Add "data-readers" to the
default list of files to exclude from ahead-of-time compilation.
2022-01-12 17:43:02 +01:00
Ryan Sundberg
bfdeba11f8
linux-container: Handle CLONE_NEWCGROUP and use it by default.
Adds low-level support for launching Linux containers with cgroup namespaces.

* gnu/build/linux-container.scm (%namespaces): Add 'cgroup.
(namespaces->bit-mask): Handle it.
* guix/build/syscalls.scm (CLONE_NEWCGROUP): New variable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-05 23:44:18 +01:00
Sarah Morgensen
c90f73f816
build-system/go: Initialize build cache from input packages.
* guix/build/go-build-system.com (setup-go-environment): Set GOCACHE to
a location within the build directory.  Union "/var/cache/go/build"
input directories to initialize the cache.  Generate "trim.txt" within
the cache, with the current time.

Signed-off-by: Leo Famulari <leo@famulari.name>
2021-12-24 16:32:25 -05:00
Maxim Cournoyer
046a23e63a
build-system: emacs: Do not rely on input labels in the 'build' phase.
This commit repairs the Emacs build system for packages using the new
label-less "guix style".  Tested with emacs-libgit.

* guix/build/emacs-build-system.scm (build): Use search-input-file to locate
emacs.
2021-12-14 11:18:46 -05:00
Nicolas Goaziou
41e61e4fed
guix: Fix typo in last commit.
* guix/build/emacs-build-system.scm (make-autoloads): Fix typo.
2021-12-14 15:49:15 +01:00
Nicolas Goaziou
6717ce28d0
guix: Do not assume "emacs" label in make-autoloads.
* guix/build/emacs-build-system.scm (make-autoloads): Look for "emacs"
executable independently on the label.
2021-12-14 15:48:02 +01:00
Ricardo Wurmus
9bc0f45df5
Merge remote-tracking branch 'origin/master' into core-updates-frozen 2021-12-05 19:17:41 +01:00
Liliana Marie Prikler
98cec36957
build-system: emacs: Keep -pkg.el files.
Partly fixes <https://bugs.gnu.org/48331> -- package descriptions can now be
found in the install directory.

* guix/build/emacs-build-system.scm (%default-exclude): Remove "-pkg\\.el$".
2021-12-03 21:39:50 +01:00
zimoun
73f55957cf
build: julia-build-system: Correctly disable parallel tests.
* guix/build/julia-build-system.scm: Remove phases trailing #t.
[phases]{check}: Omit the --procs argument when parallel tests are to be
disabled.  Substract 1 from the number of parallel jobs otherwise.

Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2021-11-27 01:22:33 -05:00
zimoun
905b090582
build: julia-build-system: Add support for parallel tests.
The tests are defined by the script 'test/runtests.jl' from packages and the
parallelism depends on the implementation of this script.  Therefore, 'julia'
is launched using local worker processes accordingly with 'parallel?'.

* guix/build/julia-build-system.scm (check): Set the JULIA_CPU_THREADS
environment variable and invoke julia with the '--procs' option.
* guix/build-system/julia.scm (julia-build)[parallel-tests?]: New argument.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2021-11-25 01:04:17 -05:00
Ludovic Courtès
b15e543d30
Merge branch 'master' into core-updates-frozen 2021-11-23 11:29:38 +01:00
Josselin Poiret
0831dfab75
system: Add swap flags.
* gnu/system/file-systems.scm (swap-space)[priority, discard?]: Add
them.
* guix/build/syscalls.scm (SWAP_FLAG_PREFER, SWAP_FLAG_PRIO_MASK,
SWAP_FLAG_PRIO_SHIFT, SWAP_FLAG_DISCARD): Add them.
* gnu/build/file-systems.scm (swap-space->flags-bit-mask): Add it.
* gnu/services/base.scm (swap-service-type): Use it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-23 10:24:27 +01:00
Maxim Cournoyer
8444b44a8c
build: syscalls: Add a SET-CHILD-SUBREAPER! procedure.
* guix/build/syscalls.scm (PR_SET_CHILD_SUBREAPER): New variable.
(set-child-subreaper!): New procedure.
2021-11-20 08:57:00 -05:00
Ludovic Courtès
3a317f7476
Merge branch 'master' into core-updates-frozen 2021-11-17 23:43:14 +01:00
Jean-Baptiste Volatier
3af351a7de
build-system/julia: Enable Julia Pkg to find installed packages.
Julia's built-in package manager (Pkg) looks for packages in
JULIA_DEPOT_PATH/packages/PACKAGENAME/XXXX, where XXXX is a string
encoding package UUID and SHA1 of files.  The link-depot phase creates
a link at the correct location to allow Pkg to find packages that were
already installed by Guix.

* guix/build/julia-build-system.scm (link-depot): New phase.
(%package-path): Modified package path from packages/ to loadpath/.
(project.toml->uuid): New procedure, retrive package uuid from TOML file.
(precompile, check): Adjust to the change in paths.
(%standard-phases): Add link-depot phase.
(julia-build): Add julia-package-uuid keyword.
* guix/build-system/julia.scm (julia-build): Also use the
julia-package-uuid keyword.
* gnu/packages/julia-jll.scm (julia-bzip2-jll, julia-cairo-jll,
julia-compilersupportlibraries-jll, julia-expat-jll, julia-ffmpeg-jll,
julia-fontconfig-jll, julia-freetype2-jll, julia-fribidi-jll,
julia-gettext-jll, julia-glib-jll, julia-gr-jll, julia-gumbo-jll,
julia-imagemagick-jll, julia-jllwrappers-jll, julia-jpegturbo-jll,
julia-lame-jll, julia-libass-jll, julia-libfdk-aac-jll,
julia-libffi-jll, julia-libgcrypt-jll, julia-libglvnd-jll,
julia-libgpg-error-jll, juli-libiconv-jll, julia-libmount-jll,
julia-libpng-jll, julia-libsass-jll, julia-libtiff-jll,
julia-libuuid-jll, julia-libvorbis-jll, julia-lzo-jll,
julia-mbedtls-jll, julia-ogg-jll, julia-openspecfun-jll,
julia-openssl-jll, julia-opus-jll, julia-pcre-jll, julia-pixman-jll,
julia-qt5base-jll, julia-wayland-jll, julia-wayland-protocols-jll,
julia-x264-jll, julia-x265-jll, julia-xkbcommon-jll, julia-xml2-jll,
julia-xorg-libpthread-stubs-jll, julia-xorg-libx11-jll,
julia-xorg-libxau-jll, julia-xorg-libxcb-jll, julia-xorg-libxcursor-jll,
julia-xorg-libxdmcp-jll, julia-xorg-libxext-jll,
julia-xorg-libxfixes-jll, julia-xorg-libxi-jll,
julia-xorg-libxinerama-jll, julia-xorg-libxkbfile-jll,
julia-xorg-libxrandr-jll, julia-xorg-libxrender-jll,
julia-xorg-xcb-util-jll, julia-xorg-xcb-util-keysyms-jll,
julia-xorg-xcb-util-renderutil-jll, julia-xorg-xcb-util-wm-jll,
julia-xorg-xkbcomp-jll, julia-xorg-xkeyboard-config-jll,
julia-xorg-xtrans-jll, julia-xslt-jll, julia-zlib-jll, julia-zstd-jll)
[argument]: Adjust the order of the phases to the change in the
julia-build-system.
* gnu/packages/julia-xyz.scm (julia-bufferedstreams, julia-calculus,
julia-dataframes, julia-datavalues, julia-distances, julia-documenter,
julia-dualnumbers, julia-ellipsisnotation, julia-expronicon,
julia-fileio, julia-fixedpointnumbers, julia-functionwrappers,
julia-fuzzycompletions, julia-genericlinearalgebra, julia-genericschur,
julia-geometrybasics, julia-imagemagick, julia-infinity,
julia-matrixfactorizations, julia-media, julia-missings, julia-nnlib,
julia-optimtestproblems, julia-orderedcollections, julia-prettytables,
julia-pycall, julia-quadmath, julia-safetests, julia-stackviews)
[arguments]: Correct paths to reflect change of %package-path modify
order of phases as link-depot needs to run on an unmodified src
directory add package-name-uuid keyword argument to packages without
Project.toml file.
* gnu/packages/julia.scm (julia)[native-search-paths]: Correct paths to
reflect change of %package-path modify order of phases as link-depot
needs to run on an unmodified src directory.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2021-11-16 14:39:51 +02:00
Vagrant Cascadian
75cae188ad
build: wrap-qt-program: Fix typo.
* gnu/build/qt-utils.scm (wrap-qt-program): Fix spelling of "program".
2021-11-14 18:02:22 -08:00
Maxim Cournoyer
dfcc96d8f4
build: meson: Replace the 'test-target' argument by 'test-options'.
This change is motivated by the need to disable the default 30 seconds timeout
that Meson uses (see: https://gitlab.gnome.org/GNOME/glib/-/issues/2522), and
also by desire to specify extra options to run the check phase without having
to override it.

* guix/build-system/meson.scm (meson-build) <test-target>: Replace argument
with...
<test-options>: ... this one.
* guix/build/meson-build-system.scm (check): Invoke 'meson test' instead of
'ninja test-target', as the former is configurable via options.
* doc/guix.texi (Build Systems) <meson-build-system>: Update doc.
2021-11-11 12:18:32 -05:00
Maxim Cournoyer
e0d9c37982
build: glib-or-gtk: Generate the gdk-pixbuf-loaders cache file in a phase.
Adding a profile hook to do so covers most use cases, but it is still
necessary to have the gdk-pixbuf loaders cache file computed at build time, as
software may expect to find loaders support at that time.

* guix/build/glib-or-gtk-build-system.scm: Delete trailing #t.
(%gdk-pixbuf-loaders-cache-file-prefix): New variable.
(generate-gdk-pixbuf-loaders-cache): New procedure.
(generate-gdk-pixbuf-loaders-cache-file): Add procedure...
(%standard-phases): ... and register it as a build phase.
2021-11-11 12:18:19 -05:00
Maxim Cournoyer
889eebc185
build: glib-or-gtk-build-system: Fix indentation.
* guix/build/glib-or-gtk-build-system.scm (gtk-module-directories)
(wrap-all-programs): Fix indentation.
2021-11-11 12:18:13 -05:00
Maxim Cournoyer
eb619cda36
build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs)
<handle-output>: Precisely build the list of variable specifications, rather
than relying on a bunch of conditionals.
2021-11-11 12:18:12 -05:00
Brendan Tildesley
3dfe45c3f1
build: qt-utils: Don't wrap .X-real files.
* guix/build/qt-utils.scm (find-files-to-wrap): Exclude already wrapped
programs.  This is forbidden in wrap-program now due to a738a663a9.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2021-11-11 10:31:31 -05:00
Efraim Flashner
bc5155b952
Merge remote-tracking branch 'origin/master' into core-updates-frozen 2021-10-31 14:49:47 +02:00