summaryrefslogtreecommitdiff
path: root/guix/packages.scm
AgeCommit message (Collapse)Author
2024-07-15guix: packages: Add &unsupported-cross-compilation-target-error.Christopher Baines
* guix/packages.scm (&unsupported-cross-compilation-target-error): New variable. * guix/ui.scm (call-with-error-handling): Handle this new condition type. Change-Id: I9e7782ee4799b5fecb3c890a75008c35c003f55d
2024-07-15guix: packages: Add new &package-unsupported-target-error.Christopher Baines
Some packages don't support cross building to specific targets, so add a error type to signal this. * guix/packages.scm (&package-unsupported-target-error): New condition type. [package-unsupported-target-error? package-unsupported-target-error-target): New procedures. * guix/ui.scm (call-with-error-handling): Handle this new condition type. Change-Id: Ib47813399e04b20d616a95f545b6aabe25736e92
2024-06-24gnu: patch: Update to latest commit [security fixes].Maxim Cournoyer
* gnu/packages/base.scm (patch): Rename to... (patch/pinned): ... this. Hide package. (patch): New variable. * gnu/packages/commencement.scm (patch-mesboot): Inherit from patch/pinned. (patch-boot0): Likewise. (%final-inputs): Replace patch with patch/pinned. * gnu/packages/lisp.scm (cl-asdf): Likewise. * guix/packages.scm (%standard-patch-inputs): Replace patch with patch/pinned. Fixes: https://issues.guix.gnu.org/47144 Reported-by: Mark H Weaver <mhw@netris.org> Change-Id: I54ae41b735f5ba0ebad30ebdfaabe0ccdc3f9873
2024-05-05packages: ‘sanitize-inputs’ does not add labels when unnecessary.Ludovic Courtès
Fixes a bug introduced in 402d0a9b9d290a2e3c549932c8d7262622c58ce1 whereby labels would be added in cases like: (inputs (list `("label" ,whatever))) This idiom is found for example in the ‘nmon’ package. * guix/packages.scm (add-input-labels): Call ‘maybe-add-input-labels’ instead of (map add-input-label …). Change-Id: I3e86d4607f19482a4e461ef8e7a20cde2a41ead7
2024-05-04packages: Reduce code bloat due to list allocation in input fields.Ludovic Courtès
* guix/packages.scm (add-input-labels): New procedure. (sanitize-inputs): Add case for (list …). Change-Id: Ice8241508ded51efd38867b97ca19c262b8c4363
2024-05-04packages: ‘define-public’ replacement calls ‘module-export!’ directly.Ludovic Courtès
This reduces code bloat and loading overhead for package modules, which use ‘define-public’ extensively. * guix/packages.scm (define-public*): Use ‘define’ followed by ‘module-export!’ directly instead of ‘define-public’. Change-Id: I7f56d46b391c1e3eeeb0b9a08a9d34b5de341245
2024-05-04packages: Reduce bloat induced by ‘sanitize-inputs’.Ludovic Courtès
At -O1, peval does the bulk of the optimization work and it cannot reduce things like (null? (list 1 2)), unlike what happens in CPS at -O2. Thus, reduce the part of ‘sanitize-inputs’ that’s inlined. * guix/packages.scm (maybe-add-input-labels): New procedure. (sanitize-inputs): Turn into a macro; use ‘maybe-add-input-labels’. Change-Id: Id2283bb5a2f5d714722200bdcfe0b0bfa606923f
2024-04-15Autoload (guix build syscalls).Ludovic Courtès
* guix/discovery.scm, guix/git.scm, guix/nar.scm, guix/scripts.scm, guix/scripts/build.scm: Autoload (guix build syscalls). * guix/packages.scm: Autoload (guix build utils). Change-Id: Ia7703b5f46e55fbfadff63b13c35bfe097ce2220
2023-12-03packages: Honor target system for the inputs to ‘patch-and-repack’.Ludovic Courtès
* guix/packages.scm (%standard-patch-inputs): Add ‘system’ parameter. Parameterize ‘%current-system’. (patch-and-repack): Pass SYSTEM to ‘%standard-patch-inputs’. Change-Id: Ic8ad93303332fd1eefba0a93a314f99db782eda6
2023-12-02gnu: Use ‘libc-utf8-locales-for-target’.Janneke Nieuwenhuizen
* guix/packages.scm (%standard-patch-inputs): Use ‘libc-utf8-locales-for-target’ instead of ‘glibc-utf8-locales’. * guix/self.scm (%packages): Likewise. * gnu/home/services/ssh.scm (file-join): Likewise * gnu/installer.scm (build-compiled-file): Likewise. * gnu/packages/chromium.scm (ungoogled-chromium/wayland): Likewise. * gnu/packages/gnome.scm (libgweather4, tracker): Likewise. * gnu/packages/javascript.scm (js-mathjax): Likewise. * gnu/packages/package-management.scm (guix, flatpak): Likewise. * gnu/packages/raspberry-pi.scm (raspi-arm64-chainloader): Likewise. * gnu/packages/suckless.scm (svkbd): Likewise. * gnu/services.scm (cleanup-gexp): Likewise. * gnu/services/base.scm (guix-publish-shepherd-service): Likewise. * gnu/services/guix.scm (guix-build-coordinator-shepherd-services) (guix-build-coordinator-agent-shepherd-services): Likewise. * gnu/services/guix.scm (guix-build-coordinator-queue-builds-shepherd-services): (guix-data-service-shepherd-services) (nar-herder-shepherd-services) (bffe-shepherd-services): Likewise. * gnu/services/web.scm (anonip-shepherd-service) (mumi-shepherd-services): Likewise. * gnu/system/image.scm (system-disk-image, system-iso9660-image) (system-docker-image, system-tarball-image): Likewise. * gnu/system/install.scm (%installation-services): Likewise. * guix/profiles.scm (info-dir-file): Likewise. (ca-certificate-bundle, profile-derivation): Likewise. * guix/scripts/pack.scm (store-database, set-utf8-locale): Likewise. * tests/pack.scm: Likewise. * tests/profiles.scm ("profile-derivation, cross-compilation"): Likewise. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Co-authored-by: Christopher Baines <mail@cbaines.net> Change-Id: I24239f427bcc930c29d2ba5d00dc615960a6c374
2023-10-28packages: Add ‘system’ parameter for ‘set-guile-for-build’.Ludovic Courtès
* guix/packages.scm (set-guile-for-build): Add ‘system’ parameter.
2023-09-06guix: packages: Support package/inherit by package-field-location.Simon Tournier
Fixes <https://issues.guix.gnu.org/65236>. * guix/packages.scm (package-field-location): Add package/inherit case. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-06-14packages: 'package-transitive-supported-systems' detects cycles.Ludovic Courtès
With this change, commands such as 'guix build' or 'guix package' report obvious package-level cycles upfront. Derivation-level cycles are not detected. * guix/packages.scm (&package-cyclic-dependency-error): New condition type. (package-transitive-supported-systems): Define 'visited', check it, and parameterize it. * guix/ui.scm (call-with-error-handling): Handle '&package-cyclic-dependency-error'. * tests/packages.scm ("package-transitive-supported-systems detects cycles"): Add test.
2023-04-21packages: 'package-direct-sources' correctly handles non-origin sources.Ludovic Courtès
Previously 'package-direct-sources' would trigger a wrong-type-arg error when passed a package whose 'source' is not an origin, such as 'ruby-sorbet-runtime'. * guix/packages.scm (package-direct-sources): Call 'expand' if and only if (package-source package) is an origin.
2023-04-17packages: Export guile-for-grafts.Christopher Baines
So this can be used in (guix self). * guix/packages.scm (guile-for-grafts): Export. Signed-off-by: Christopher Baines <mail@cbaines.net>
2023-04-07packages: Remove 'origin-sha256' procedure.Bruno Victal
* guix/packages.scm (origin-sha256): Remove procedure. * tests/import-utils.scm (test-import-utils) [alist->package with explicit source]: Use content-hash-value. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-13packages: 'package-input-rewriting/spec' ignores hidden packages.Ludovic Courtès
The primary motivation is to support things like: guix build guix --with-input=guile=guile-next without triggering a rebuild of (@@ (gnu packages commencement) guile-final) and similar things. It is also consistent with package name resolution on the command line: a package that cannot be named cannot be replaced. * guix/packages.scm (package-input-rewriting/spec)[rewrite]: When P is hidden, return it as-is. * tests/packages.scm ("package-input-rewriting/spec, hidden package"): New test. * doc/guix.texi (Defining Package Variants): Update. (Package Transformation Options): Update '--with-input' example.
2023-03-13packages: Use SRFI-71 instead of SRFI-11.Ludovic Courtès
* guix/packages.scm (package-input-rewriting/spec): Use SRFI-71 'let'.
2023-03-13packages: Consider 'patches' by 'package-direct-sources'.Simon Tournier
* guix/packages.scm (package-direct-sources): Return 'origin' from 'patches'. * tests/packages.scm: Test it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-12-19guix: packages: Add type hint comment to home-page record field.jgart
* guix/packages.scm (package)[home-page]: Add type comment. Signed-off-by: Andrew Tropin <andrew@trop.in>
2022-12-13packages: Add 'package-upstream-name*'.Lars-Dominik Braun
* guix/packages.scm (package-upstream-name*): New procedure. * tests/packages.scm ("package-upstream-name*"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-12-06gnu: Resolve derivation lint warnings.Christopher Baines
Computing derivations for these systems (i686-gnu and riscv32-linux) fails with an error like the following: could not find bootstrap binary 'tar' for system * gnu/packages/mes.scm (mescc-tools)[supported-systems]: Remove riscv32-linux. * guix/packages.scm (%hurd-system): Remove i686-gnu. Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-11-21guix: modify-input: Recommend prepend instead of append.Vivien Kraus
* doc/guix.texi (Defining Package Variants): Document the "prepend" clause of modify-inputs first. * guix/packages.scm (modify-inputs): use "prepend" in the docstring. Signed-off-by: Christopher Baines <mail@cbaines.net>
2022-10-10packages: Raise an exception for invalid 'license' values.Ludovic Courtès
This is written in such a way that the type check turns into a no-op at macro-expansion time for trivial cases: > ,optimize (validate-license gpl3+) $18 = gpl3+ > ,optimize (validate-license (list gpl3+ gpl2+)) $19 = (list gpl3+ gpl2+) * guix/packages.scm (valid-license-value?, validate-license): New macros. (<package>)[license]: Add 'sanitize' option. (&package-license-error): New error condition type. * tests/packages.scm ("license type checking"): New test.
2022-06-16packages: Change the order of %SUPPORTED-SYSTEMS.Ludovic Courtès
Commit 2a34333d0c238fa0983659ea71f0e1af4ff0ac7b led to a couple of test failures in tests/packages.scm and tests/lint.scm due to the different ordering. * guix/packages.scm (%supported-systems): Move %64BIT-SUPPORTED-SYSTEMS first.
2022-06-12guix: packages: Add %32bit-supported-systems, %64bit-supported-systems.Efraim Flashner
* guix/packages.scm (%32bit-supported-systems, %64bit-supported-systems): New variables. (%supported-systems): Rewrite using %32bit-supported-systems, %64bit-supported-systems.
2022-05-31packages: Fix typo in package-superseded doc.Maxim Cournoyer
* guix/packages.scm (package-superseded): Fix typo.
2022-05-18packages: Use separate package/graft cache.Ludovic Courtès
* guix/packages.scm (%package-graft-cache): New variable. (input-graft): Add (=> %package-graft-cache).
2022-03-22packages: Clarify comment about build-system package record field.jgart
* guix/packages.scm (<package>): Clarify that what goes in the build-system package record field is a build-system record instance. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-03-21packages: Fix time-travel from Guix 1.1.0 / Guile < 2.2.7.Maxime Devos
* guix/packages.scm: Only set #:replace? #true when Guile is >= 2.2.7. Fixes: <https://issues.guix.gnu.org/53765> Reported-By: Peter Kois <kangus@gmail.com> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-03-16packages: 'modify-inputs' preserves outputs in 'replace' clauses.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/53915>. Reported by Gordon Quad <gordon@niflheim.info>. * guix/packages.scm (replace-input): Preserve the outputs of INPUT by default. * tests/packages.scm ("modify-inputs, replace, extra output"): New test.
2022-02-18packages: 'package-transitive-supported-systems' ignores ↵Ludovic Courtès
'%current-target-system'. Previously 'package-transitive-supported-systems' would enter an infinite loop over the cross-compilation tool chain if %CURRENT-TARGET-SYSTEM was set. * guix/packages.scm (package-transitive-supported-systems)[supported-systems-procedure]: Pass explicit SYSTEM and TARGET parameters. * tests/packages.scm ("supported-package? vs. %current-target-system"): New test.
2022-01-14gnu: bootstrap: Add support for riscv64-linux.Efraim Flashner
On 7d93b21ab1c132990054372a9677c1639d54e631 gnu: glibc-for-bootstrap: Update patch. Run ./pre-inst-env guix build --target=riscv64-linux-gnu bootstrap-tarballs Producing /gnu/store/4hdzva9i0wyyfbgj1lmqc1wkk644pv07-bootstrap-tarballs-0 With guix hash -rx 1nj0fdgj08bbmfny01mp2blv7c3p2iciqh31zmf04ap5s7ygsqlp * gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for riscv64-linux. (%bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc, %bootstrap-gcc): Add entry for riscv64-linux. (raw-build-guile3): New procedure. (make-raw-bag): Use raw-build-guile3 for riscv64-linux. * guix/packages.scm (%supported-systems): Add riscv64-linux. (%cuirass-supported-systems): Remove riscv64-linux. * guix/utils.scm (target-64bit?): Add riscv64-linux. * m4/guix.m4: Add riscv64-linux as a supported system. * doc/guix.texi (GNU Distribution): Add riscv64-linux.
2021-12-22packages: Avoid #:re-export-and-replace to allow upgrades from 1.2.0.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/52694>. Reported by Carl Dong <contact@carldong.me>. Use of #:re-export-and-replace would prevent upgrades from 1.2.0, whose 'source-module-closure' procedure did not recognize #:re-export-and-replace. * guix/packages.scm: Remove #:re-export-and-replace and add top-level call to 'module-re-export!'
2021-12-13packages: 'modify-inputs' preserves and introduces input labels if needed.Ludovic Courtès
Fixes a bug whereby, in an expression like this: (modify-inputs lst (delete ...) (prepend ...)) the 'delete' clause would have no effect because 'prepend' would pass it a label-less input list. * guix/packages.scm (inputs-sans-labels): Remove. (modify-inputs): In the 'prepend' and 'append' cases, preserve/add input labels instead of removing them.
2021-11-17Merge branch 'master' into core-updates-frozenLudovic Courtès
2021-11-13guix: packages: Clarify that list is a list of <license> records.jgart
* guix/packages/packages.scm (<package>): Clarify that the license field takes a list of licenses rather than a generic list. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2021-11-11guix: packages: Fix repacking of plain tarballs.Maxim Cournoyer
Fixes <https://issues.guix.gnu.org/50066>. * guix/packages.scm (patch-and-repack): Test for a tarball using tarball? and move the plain file copy to the else clause. Reported-by: Mathieu Othacehe <othacehe@gnu.org>
2021-10-31Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner
2021-10-28packages: Optionally validate Texinfo markup at expansion time.Ludovic Courtès
* guix/packages.scm (validate-texinfo): New macro. (<package>)[synopsis, description]: Add 'sanitize' property.
2021-10-26packages: Optimize 'package-transitive-supported-systems'.Ludovic Courtès
With this change, the wall-clock time of: ./pre-inst-env guile -c '(use-modules (gnu) (guix)(ice-9 time)) (time (pk (fold-packages (lambda (p r)(supported-package? p)(+ 1 r)) 0)))' goes from 3.2s to 2.0s, a 37% improvement. * guix/packages.scm (package-transitive-supported-systems): Change 'supported-systems' to 'supported-systems-procedure', returning an 'mlambdaq' instead of the original 'mlambda'. Add 'procs'. Adjust body accordingly.
2021-10-25packages: Add 'package-development-inputs'.Ludovic Courtès
* guix/packages.scm (package-development-inputs): New procedure. * guix/scripts/environment.scm (package-environment-inputs): Use it. * tests/packages.scm ("package-development-inputs") ("package-development-inputs, cross-compilation"): New tests. * doc/guix.texi (package Reference): Document it.
2021-10-22guix: packages: Add comment on license field.jgart via Guix-patches via
* guix/packages/packages.scm (<package>): Add comment about the type that the license field expects as part of a package record. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2021-10-12Merge remote-tracking branch 'origin/master' into core-updates-frozen.Mathieu Othacehe
2021-09-30packages: Factorize and document 'computed-origin-method'.zimoun
The 'computed-origin-method' had been introduced to work around limitations of the 'snippet' mechanism. The procedure was duplicated, which made it hard to automatically detect packages using it. * guix/packages.scm (computed-origin-method): Move procedure from... * gnu/packages/gnuzilla.scm: ...here and... * gnu/packages/gnuzilla.scm: ...there. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-09-27packages: Use 'guile-for-grafts' for grafting.Ludovic Courtès
The call to 'guile-for-grafts' had been inadvertently replaced by a call to 'default-guile' in commit 9e5812ac59b01ff011ec0c5b0f437dfe85d6fcc7. Unfortunately Guile 3.0.7 still occasionally segfaults while grafting so we still need 2.0 here. * guix/packages.scm (package->derivation, package->cross-derivation): Use 'guile-for-grafts' instead of 'default-guile'.
2021-09-17Merge branch 'master' into core-updates-frozenMarius Bakke
Conflicts: gnu/packages/bioinformatics.scm gnu/packages/chez.scm gnu/packages/docbook.scm gnu/packages/ebook.scm gnu/packages/gnome.scm gnu/packages/linux.scm gnu/packages/networking.scm gnu/packages/python-web.scm gnu/packages/python-xyz.scm gnu/packages/tex.scm gnu/packages/version-control.scm gnu/packages/xml.scm guix/build-system/dune.scm guix/build-system/go.scm guix/build-system/linux-module.scm guix/packages.scm
2021-09-13packages: Add 'package-definition-location'.Ludovic Courtès
Suggested by Maxime Devos <maximedevos@telenet.be>. * guix/packages.scm (current-definition-location): New syntax parameter. (define-public*): New macro. (<package>)[definition-location]: New field. (package-definition-location): New procedure. * tests/packages.scm ("package-definition-location"): New test.
2021-09-13packages: Store 'location' field as a literal vector.Ludovic Courtès
This is slightly more efficient than storing an alist in terms of .go file size (< 1% smaller) and load time. * guix/packages.scm (current-location-vector): New macro. (sanitize-location): New procedure. (<package>)[location]: Change 'default' and add 'sanitize'. (package-location): New procedure.
2021-07-23packages: Use 'lookup-package-input' and friends instead of 'package-input'.Maxime Devos
* guix/packages.scm (package-input, package-native-input): Remove. (this-package-input): Use 'lookup-package-input' and 'lookup-package-propagated-input' instead of 'package-input'. (this-package-native-input): Use 'lookup-package-native-input' instead of 'package-input'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>