aboutsummaryrefslogtreecommitdiff
path: root/guix/packages.scm
Commit message (Collapse)AuthorAge
* packages: ‘sanitize-inputs’ does not add labels when unnecessary.Ludovic Courtès12 days
| | | | | | | | | | | | | | 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
* packages: Reduce code bloat due to list allocation in input fields.Ludovic Courtès12 days
| | | | | | | * guix/packages.scm (add-input-labels): New procedure. (sanitize-inputs): Add case for (list …). Change-Id: Ice8241508ded51efd38867b97ca19c262b8c4363
* packages: ‘define-public’ replacement calls ‘module-export!’ directly.Ludovic Courtès12 days
| | | | | | | | | | 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
* packages: Reduce bloat induced by ‘sanitize-inputs’.Ludovic Courtès12 days
| | | | | | | | | | | 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
* Autoload (guix build syscalls).Ludovic Courtès2024-04-15
| | | | | | | | * 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
* packages: Honor target system for the inputs to ‘patch-and-repack’.Ludovic Courtès2023-12-03
| | | | | | | | * guix/packages.scm (%standard-patch-inputs): Add ‘system’ parameter. Parameterize ‘%current-system’. (patch-and-repack): Pass SYSTEM to ‘%standard-patch-inputs’. Change-Id: Ic8ad93303332fd1eefba0a93a314f99db782eda6
* gnu: Use ‘libc-utf8-locales-for-target’.Janneke Nieuwenhuizen2023-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* packages: Add ‘system’ parameter for ‘set-guile-for-build’.Ludovic Courtès2023-10-28
| | | | * guix/packages.scm (set-guile-for-build): Add ‘system’ parameter.
* guix: packages: Support package/inherit by package-field-location.Simon Tournier2023-09-06
| | | | | | | | | | 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>
* packages: 'package-transitive-supported-systems' detects cycles.Ludovic Courtès2023-06-14
| | | | | | | | | | | | | | | 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.
* packages: 'package-direct-sources' correctly handles non-origin sources.Ludovic Courtès2023-04-21
| | | | | | | | | 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.
* packages: Export guile-for-grafts.Christopher Baines2023-04-17
| | | | | | | | So this can be used in (guix self). * guix/packages.scm (guile-for-grafts): Export. Signed-off-by: Christopher Baines <mail@cbaines.net>
* packages: Remove 'origin-sha256' procedure.Bruno Victal2023-04-07
| | | | | | | | * 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>
* packages: 'package-input-rewriting/spec' ignores hidden packages.Ludovic Courtès2023-03-13
| | | | | | | | | | | | | | | | | | | 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.
* packages: Use SRFI-71 instead of SRFI-11.Ludovic Courtès2023-03-13
| | | | * guix/packages.scm (package-input-rewriting/spec): Use SRFI-71 'let'.
* packages: Consider 'patches' by 'package-direct-sources'.Simon Tournier2023-03-13
| | | | | | | * guix/packages.scm (package-direct-sources): Return 'origin' from 'patches'. * tests/packages.scm: Test it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix: packages: Add type hint comment to home-page record field.jgart2022-12-19
| | | | | | * guix/packages.scm (package)[home-page]: Add type comment. Signed-off-by: Andrew Tropin <andrew@trop.in>
* packages: Add 'package-upstream-name*'.Lars-Dominik Braun2022-12-13
| | | | | | | * 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>
* gnu: Resolve derivation lint warnings.Christopher Baines2022-12-06
| | | | | | | | | | | | 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>
* guix: modify-input: Recommend prepend instead of append.Vivien Kraus2022-11-21
| | | | | | | | * 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>
* packages: Raise an exception for invalid 'license' values.Ludovic Courtès2022-10-10
| | | | | | | | | | | | | | | | 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.
* packages: Change the order of %SUPPORTED-SYSTEMS.Ludovic Courtès2022-06-16
| | | | | | | | | 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.
* guix: packages: Add %32bit-supported-systems, %64bit-supported-systems.Efraim Flashner2022-06-12
| | | | | | | * guix/packages.scm (%32bit-supported-systems, %64bit-supported-systems): New variables. (%supported-systems): Rewrite using %32bit-supported-systems, %64bit-supported-systems.
* packages: Fix typo in package-superseded doc.Maxim Cournoyer2022-05-31
| | | | * guix/packages.scm (package-superseded): Fix typo.
* packages: Use separate package/graft cache.Ludovic Courtès2022-05-18
| | | | | * guix/packages.scm (%package-graft-cache): New variable. (input-graft): Add (=> %package-graft-cache).
* packages: Clarify comment about build-system package record field.jgart2022-03-22
| | | | | | | * 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>
* packages: Fix time-travel from Guix 1.1.0 / Guile < 2.2.7.Maxime Devos2022-03-21
| | | | | | | | * 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>
* packages: 'modify-inputs' preserves outputs in 'replace' clauses.Ludovic Courtès2022-03-16
| | | | | | | | | 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.
* packages: 'package-transitive-supported-systems' ignores ↵Ludovic Courtès2022-02-18
| | | | | | | | | | | | | '%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.
* gnu: bootstrap: Add support for riscv64-linux.Efraim Flashner2022-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* packages: Avoid #:re-export-and-replace to allow upgrades from 1.2.0.Ludovic Courtès2021-12-22
| | | | | | | | | | | 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!'
* packages: 'modify-inputs' preserves and introduces input labels if needed.Ludovic Courtès2021-12-13
| | | | | | | | | | | | | | | 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.
* Merge branch 'master' into core-updates-frozenLudovic Courtès2021-11-17
|\
| * guix: packages: Clarify that list is a list of <license> records.jgart2021-11-13
| | | | | | | | | | | | | | * 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>
* | guix: packages: Fix repacking of plain tarballs.Maxim Cournoyer2021-11-11
| | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner2021-10-31
|\|
| * packages: Optionally validate Texinfo markup at expansion time.Ludovic Courtès2021-10-28
| | | | | | | | | | * guix/packages.scm (validate-texinfo): New macro. (<package>)[synopsis, description]: Add 'sanitize' property.
| * packages: Optimize 'package-transitive-supported-systems'.Ludovic Courtès2021-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * packages: Add 'package-development-inputs'.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | * 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.
| * guix: packages: Add comment on license field.jgart via Guix-patches via2021-10-22
| | | | | | | | | | | | | | * 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>
* | Merge remote-tracking branch 'origin/master' into core-updates-frozen.Mathieu Othacehe2021-10-12
|\|
| * packages: Factorize and document 'computed-origin-method'.zimoun2021-09-30
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | packages: Use 'guile-for-grafts' for grafting.Ludovic Courtès2021-09-27
| | | | | | | | | | | | | | | | | | | | 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'.
* | Merge branch 'master' into core-updates-frozenMarius Bakke2021-09-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * packages: Add 'package-definition-location'.Ludovic Courtès2021-09-13
| | | | | | | | | | | | | | | | | | | | 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.
| * packages: Store 'location' field as a literal vector.Ludovic Courtès2021-09-13
| | | | | | | | | | | | | | | | | | | | 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.
* | packages: Use 'lookup-package-input' and friends instead of 'package-input'.Maxime Devos2021-07-23
| | | | | | | | | | | | | | | | | | | | * 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>
* | packages: Define this-package-input and this-package-native-input.Maxime Devos2021-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | These macros are intended to be used in build phases. More precisely, (assoc-ref %build-inputs "input") can be replaced by #$(this-package-input "input") or #+(this-package-native-input "native-input") as appropriate. * guix/packages.scm (package-input, package-native-input): New (unexported) procedures. (this-package-input, this-package-native-input): New macros. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* | packages: 'hidden-package' inherits the original package location.Ludovic Courtès2021-07-11
| | | | | | | | * guix/packages.scm (hidden-package): Inherit 'location' from P.
* | utils: Add 'go-to-location' with source location caching.Ludovic Courtès2021-07-11
| | | | | | | | | | | | | | | | * guix/utils.scm (%source-location-map): New variable. (go-to-location): New procedure. (edit-expression): Use it instead of custom loop. * guix/packages.scm (package-field-location)[goto]: Remove. Use 'go-to-location' instead of 'goto'.