summaryrefslogtreecommitdiff
path: root/guix/packages.scm
AgeCommit message (Collapse)Author
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>
2021-07-14packages: Define this-package-input and this-package-native-input.Maxime Devos
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>
2021-07-11packages: 'hidden-package' inherits the original package location.Ludovic Courtès
* guix/packages.scm (hidden-package): Inherit 'location' from P.
2021-07-11utils: Add 'go-to-location' with source location caching.Ludovic Courtès
* 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'.
2021-07-11packages: Add 'modify-inputs'.Ludovic Courtès
* guix/packages.scm (inputs-sans-labels, replace-input): New procedures. (prepend, replace, modify-inputs): New macros. * doc/guix.texi (Defining Package Variants): Document 'modify-inputs'. * dir-locals.el: Add 'modify-inputs' and its keywords.
2021-07-11packages: Add 'lookup-package-input' & co.Ludovic Courtès
* guix/packages.scm (lookup-input, lookup-package-input) (lookup-package-native-input, lookup-package-propagated-input) (lookup-package-direct-input): New procedures. * doc/guix.texi (package Reference): Document them.
2021-07-11packages: Allow inputs to be plain package lists.Ludovic Courtès
* guix/packages.scm (add-input-label, sanitize-inputs): New procedures. (<package>)[inputs, propagated-inputs, native-inputs]: Add 'sanitize' property. * doc/guix.texi (Defining Packages, package Reference): (Defining Package Variants): Adjust examples accordingly. * tests/packages.scm ("transaction-upgrade-entry, zero upgrades, propagated inputs") ("transaction-upgrade-entry, grafts") ("package-transitive-inputs") ("package-transitive-supported-systems") ("package-closure") ("supported-package?") ("package-derivation, inputs deduplicated") ("package-transitive-native-search-paths") ("package-grafts, indirect grafts") ("package-grafts, indirect grafts, propagated inputs") ("package-grafts, same replacement twice") ("package-grafts, dependency on several outputs") ("replacement also grafted") ("package->bag, sensitivity to %current-target-system") ("package->bag, propagated inputs") ("package->bag, sensitivity to %current-system") ("package-input-rewriting/spec, identity") ("package-input-rewriting, identity"): Use the label-less input style.
2021-07-01packages: 'package-derivation' honors 'system' again.Ludovic Courtès
Fixes a regression introduced in 7d873f194ca69d6096d28d7a224ab78e83e34fe1. Starting from 7d873f194ca69d6096d28d7a224ab78e83e34fe1, running guix build -s aarch64-linux sed on an x86_64-linux machine would return an x86_64-linux machine, whereby only the top derivation of the graph would be aarch64-linux while all its dependencies would be x86_64-linux. * guix/packages.scm (expand-input): Add 'system' parameter and honor it. (bag->derivation, bag->cross-derivation): Pass SYSTEM to 'expand-input'. * tests/packages.scm ("package-derivation, different system"): New test.
2021-05-23gnu: bootstrap: Add support for powerpc-linux.Efraim Flashner
On 923bb70a1bff657125c3008f119a477e5cb57c2b gnu:glibc-for-bootstrap: Fix patch. Run ./pre-inst-env guix build --target=powerpc-linux-gnu bootstrap-tarballs Producing /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0 With guix hash -rx /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0 02xx2ydj28pwv3vflqffinpq1icj09gzi9icm8j4bwc4lca9irxn * gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for powerpc-linux. (%bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils, %bootstrap-glibc, %bootstrap-gcc): Add entry for powerpc-linux. * gnu/packages.scm (%supported-systems): Add powerpc-linux. (%hydra-supported-systems): Remove powerpc-linux. * m4/guix.m4: Add powerpc-linux as a supported system.
2021-05-09Merge branch 'master' into core-updatesMarius Bakke
Conflicts: gnu/local.mk gnu/packages/bioinformatics.scm gnu/packages/django.scm gnu/packages/gtk.scm gnu/packages/llvm.scm gnu/packages/python-web.scm gnu/packages/python.scm gnu/packages/tex.scm guix/build-system/asdf.scm guix/build/emacs-build-system.scm guix/profiles.scm
2021-04-29packages: 'package-with-patches' preserves package location.Ludovic Courtès
* guix/packages.scm (package-with-patches): Preserve the 'location' field of ORIGINAL.
2021-04-22packages: Fix patch-and-repack for ZIP files.Danny Milosavljevic
* guix/packages.scm (patch-and-repack): Fix for ZIP files. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-03-30packages: Call 'bag-grafts' only on the tip of the package graph.Ludovic Courtès
This reinstates pre-gexp behavior where 'expand-input' would explicitly pass #:graft? #f in recursive calls, thereby preventing redundant calls to 'bag-grafts'. * guix/packages.scm (expand-input): Turn into a monadic procedure. Lower INPUT when it's a package, passing #:graft? #f. (bag->derivation, bag->cross-derivation): Adjust accordingly. * tests/packages.scm ("search paths"): Adjust so BUILD aborts only when passed the package of interest.
2021-03-30packages: 'expand-input' accepts any file-like object.Ludovic Courtès
* guix/packages.scm (expand-input)[valid?]: Remove. Call 'file-like?' instead of 'valid?'. Remove 'struct?' clause. * tests/packages.scm ("&package-input-error"): Adjust accordingly.