summaryrefslogtreecommitdiff
path: root/gnu/packages.scm
AgeCommit message (Expand)Author
2019-10-14packages: 'fold-available-packages' uses 'supported-package?'....Fixes <https://bugs.gnu.org/37748>. Reported by Marius Bakke <mbakke@fastmail.com>. This is a followup to d2d63e20d5b981009b61bf416b4d7b516e8f1f34. * gnu/packages.scm (fold-available-packages): Use 'supported-package?' instead of (member ... (package-supported-systems ...)) to match what 'generate-package-cache' does. Ludovic Courtès
2019-09-06packages: 'generate-package-cache' uses 'supported-package?'....* gnu/packages.scm (generate-package-cache): Use 'supported-package?' instead of 'package-supported-systems'. Ludovic Courtès
2019-06-27Merge branch 'master' into core-updatesLudovic Courtès
2019-06-27packages: 'specification->package+output' distinguishes "no output specified"....Until now the caller couldn't tell the different between a spec like "foo:out" and one like "foo". This change allows users to distinguish between these two cases. * gnu/packages.scm (specification->package+output): Disable output membership test when OUTPUT = #f and SUB-DRV = #f. * tests/packages.scm ("specification->package+output") ("specification->package+output invalid output") ("specification->package+output no default output") ("specification->package+output invalid output, no default"): New tests. Ludovic Courtès
2019-06-14packages: Remove 'search-bootstrap-binary'....* gnu/packages.scm (%bootstrap-binaries-path, search-bootstrap-binary): Remove. * gnu/packages/bootstrap.scm (bootstrap-executable): Export. * guix/tests.scm (bootstrap-binary-file, search-bootstrap-binary): Export. * tests/derivations.scm: Remove (gnu packages) import. * tests/grafts.scm: Likewise. * tests/guix-daemon.sh: Likewise. Ludovic Courtès
2019-05-01Merge branch 'master' into core-updatesMarius Bakke
2019-03-28packages: Reintroduce 'find-newest-available-packages'....This is a followup to e2a903c807ccacec5925f197ce26f626060e1953. * gnu/packages.scm (find-newest-available-packages): New procedure. Ludovic Courtès
2019-03-14Merge branch 'staging' into core-updatesMarius Bakke
2019-03-11packages: Add the channel .go files to the search path....Until now %LOAD-COMPILED-PATH would wrongfully contain: CHANNEL/share/guile/site/X.Y for each channel, thereby ignoring all the .go files of channels. This fixes it so that %LOAD-COMPILED-PATH instead contains: CHANNEL/lib/guile/X.Y/site-ccache * guix/describe.scm (current-channel-entries): New procedure. (package-path-entries): Change to return the %LOAD-COMPILED-PATH entries as a second value. * gnu/packages.scm (%package-module-path): Expect two values from 'package-path-entries' and augment %LOAD-COMPILED-PATH accordingly. Ludovic Courtès
2019-02-20Merge branch 'staging' into core-updatesMarius Bakke
2019-02-16packages: Remove duplicates from package cache....Previously the same package could appear several times if several variables were bound to it, as is notably the case for "python" currently. This, in turn, would lead to obnoxious "ambiguous package specification" messages. * gnu/packages.scm (generate-package-cache)[expand-cache]: Change RESULT to RESULT+SEEN and adjust accordingly. Call 'first' on the result of 'fold-module-public-variables*'. * tests/packages.scm ("fold-available-packages with/without cache"): Check for lack of duplicates in FROM-CACHE. Ludovic Courtès
2019-02-06Merge branch 'master' into core-updatesRicardo Wurmus
2019-01-15guix package: '--list-available' can use data from the cache....* gnu/packages.scm (fold-available-packages): New procedure. * guix/scripts/package.scm (process-query): Use it instead of 'fold-packages'. * tests/packages.scm ("fold-available-packages with/without cache"): New test. Ludovic Courtès
2019-01-15edit: Use 'specification->location' to read information from the cache....That way 'guix edit' doesn't need to load any package module. * gnu/packages.scm (find-package-locations, specification->location): New procedures. * guix/scripts/edit.scm (package->location-specification): Rename to... (location->location-specification): ... this. Expect a location object instead of a package. (guix-edit): Use 'specification->location' instead of 'specification->package'. * tests/packages.scm ("find-package-locations") ("find-package-locations with cache") ("specification->location"): New tests. Ludovic Courtès
2019-01-15channels: Compute a package cache and use it....* gnu/packages.scm (cache-is-authoritative?, load-package-cache) (cache-lookup, generate-package-cache): New procedures. (%package-cache-file): New variable. (find-packages-by-name): Rename to... (find-packages-by-name/direct): ... this. (find-packages-by-name): Rewrite to use the package cache when 'cache-is-authoritative?' returns true. * tests/packages.scm ("find-packages-by-name + version, with cache") ("find-packages-by-name with cache"): New tests. * guix/channels.scm (package-cache-file): New procedure. (%channel-profile-hooks): New variable. (channel-instances->derivation): Use it in #:hooks. * guix/scripts/package.scm (build-and-use-profile): Add #:hooks and honor it. * guix/scripts/pull.scm (build-and-install): Pass #:hooks to UPDATE-PROFILE. Ludovic Courtès
2019-01-15packages: Remove 'find-newest-available-packages'....Since commit 9ffc1c00e55eb7931846dbb3fafcf54716fff57c, 'find-newest-available-packages' and 'find-packages-by-name' were both building a vhash mapping package names to packages. This factorizes this bit, also reducing I/O, CPU, and memory usage. * gnu/packages.scm (find-best-packages-by-name): Remove. (find-best-packages-by-name): Use 'find-packages-by-name' instead of 'find-newest-available-packages'. Ludovic Courtès
2018-12-20gnu: Use i686-linux bootstrap binaries on x86_64-linux....This saves 4.4 MB on the installed Guix. * gnu/packages/bootstrap/x86_64-linux: Remove directory. * gnu/local.mk (bootstrap_x86_64_linuxdir) (dist_bootstrap_x86_64_linux_DATA): Remove. * gnu/packages.scm (search-bootstrap-binary): When SYSTEM is "x86_64-linux", use "i686-linux" instead. Ludovic Courtès
2018-09-02Add (guix describe) and use it to initialize '%package-search-path'....* guix/describe.scm: New file. * Makefile.am (MODULES): Add it. * gnu/packages.scm (%default-package-module-path): New variable. (%package-module-path): Honor 'package-path-entries'. * build-aux/update-NEWS.scm (main): Use %DEFAULT-PACKAGE-MODULE-PATH instead of (last (%package-module-path)). Ludovic Courtès
2018-05-13packages: 'find-packages-by-name' properly honors version prefixes....Fixes <https://bugs.gnu.org/28446>. Reported by Mark H Weaver <mhw@netris.org>. * gnu/packages.scm (find-packages-by-name): Use 'version-prefix?' instead of 'string-prefix?'. Ludovic Courtès
2018-04-08discovery: Remove dependency on (guix ui)....This reduces the closure of (guix discovery) from 28 to 8 modules. * guix/discovery.scm (scheme-files): Use 'format' instead of 'warning'. (scheme-modules): Add #:warn parameter. Use it instead of 'warn-about-load-error'. (fold-modules): Add #:warn and pass it to 'scheme-modules'. (all-modules): Likewise. * gnu/bootloader.scm (bootloader-modules): Pass #:warn to 'all-modules'. * gnu/packages.scm (fold-packages): Likewise. * gnu/services.scm (all-service-modules): Likewise. * guix/upstream.scm (importer-modules): Likewise. Ludovic Courtès
2018-04-08Add (guix self)....* guix/self.scm: New file. * Makefile.am (MODULES): Add it. * gnu/packages.scm (%distro-root-directory): Rewrite to try different directories. * guix/discovery.scm (guix): Export 'scheme-files'. Ludovic Courtès
2017-11-07packages: 'fold-packages' takes #:select? parameter....* gnu/packages.scm (fold-packages): Add #:select? parameter and honor it. Ludovic Courtès
2017-09-01packages: 'fold-packages' takes an optional 'modules' parameter....Suggested by Christopher Baines <mail@cbaines.net>. * gnu/packages.scm (fold-packages): Add optional 'modules' parameter and honor it. Ludovic Courtès
2017-06-11packages: Add 'specifications->manifest'....* gnu/packages.scm (specifications->manifest): New procedure. * doc/guix.texi (Invoking guix package): Change example from using '(compose list specification->package+output)' to using 'specifications->manifest'. Ludovic Courtès
2017-05-03Add (guix discovery)....* guix/discovery.scm, tests/discovery.scm: New files. * gnu/packages.scm (scheme-files, file-name->module-name) (scheme-modules, all-package-modules): Remove. (fold-packages): Rewrite in terms of 'fold-module-public-variables'. * gnu/tests.scm: Use (guix discovery). * Makefile.am (MODULES): Add guix/discovery.scm. (SCM_TESTS): Add tests/discovery.scm. Ludovic Courtès
2017-05-03ui: Rename '_' to 'G_'....This avoids collisions with '_' when the latter is used as a 'match' pattern for instance. See <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>. * guix/ui.scm: Rename '_' to 'G_'. * po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly. * build-aux/compile-all.scm (warnings): Remove 'format'. * gnu/packages.scm, gnu/services.scm, gnu/services/shepherd.scm, gnu/system.scm, gnu/system/shadow.scm, guix/gnupg.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/elpa.scm, guix/import/pypi.scm, guix/nar.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/container.scm, guix/scripts/container/exec.scm, guix/scripts/copy.scm, guix/scripts/download.scm, guix/scripts/edit.scm, guix/scripts/environment.scm, guix/scripts/gc.scm, guix/scripts/graph.scm, guix/scripts/hash.scm, guix/scripts/import.scm, guix/scripts/import/cpan.scm, guix/scripts/import/cran.scm, guix/scripts/import/crate.scm, guix/scripts/import/elpa.scm, guix/scripts/import/gem.scm, guix/scripts/import/gnu.scm, guix/scripts/import/hackage.scm, guix/scripts/import/nix.scm, guix/scripts/import/pypi.scm, guix/scripts/import/stackage.scm, guix/scripts/lint.scm, guix/scripts/offload.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/perform-download.scm, guix/scripts/publish.scm, guix/scripts/pull.scm, guix/scripts/refresh.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/scripts/system.scm, guix/ssh.scm, guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`". Ludovic Courtès
2017-05-01packages: Remove support for PACKAGE-VERSION deprecated syntax....This syntax had been deprecated since 2016-02-28. * gnu/packages.scm (%find-package): Remove #:fallback? parameter and handling. * tests/guix-build.sh: Remove test for "time-1.7" syntax. * doc/guix.texi (Invoking guix lint): Update 'guix lint' output in example. Ludovic Courtès
2017-03-08packages: Use PACKAGE@VERSION syntax when reporting ambiguities....* gnu/packages.scm (%find-package): Upon ambiguity, use the PACKAGE@VERSION syntax instead of 'package-full-name'. Ludovic Courtès
2017-02-27packages: Add 'search-auxiliary-file'....Suggested-by: Ludovic Courtès <ludo@gnu.org> at <http://lists.gnu.org/archive/html/guix-devel/2016-12/msg01174.html>. * gnu/packages.scm (%auxiliary-files-path): New variable. (search-auxiliary-file): New procedure. Alex Kost
2017-01-28Use 'mlambda' instead of 'memoize'....* gnu/packages.scm (find-newest-available-packages): Use 'mlambda' instead of (memoize (lambda ...) ...). * gnu/packages/bootstrap.scm (package-with-bootstrap-guile): Likewise. * guix/build-system/gnu.scm (package-with-explicit-inputs)[rewritten-input]: Likewise. * guix/build-system/python.scm (package-with-explicit-python)[transform]: Likewise. * guix/derivations.scm (derivation->string): Likewise. * guix/gnu-maintenance.scm (gnu-package?): Likewise. * guix/modules.scm (module-file-dependencies): Likewise. * guix/scripts/graph.scm (standard-package-set): Likewise. * guix/scripts/lint.scm (official-gnu-packages*): Likewise. * guix/store.scm (store-regexp*): Likewise. * guix/utils.scm (location): Likewise. Ludovic Courtès
2017-01-28Add (guix memoization)....* guix/combinators.scm (memoize): Remove. * guix/memoization.scm: New file. * Makefile.am (MODULES): Add it. * gnu/packages.scm, gnu/packages/bootstrap.scm, guix/build-system/gnu.scm, guix/build-system/python.scm, guix/derivations.scm, guix/gnu-maintenance.scm, guix/import/cran.scm, guix/import/elpa.scm, guix/modules.scm, guix/scripts/build.scm, guix/scripts/graph.scm, guix/scripts/lint.scm, guix/store.scm, guix/utils.scm: Adjust imports accordingly. Ludovic Courtès
2016-09-20ui: Do not shadow '_' where it's used as a literal syntax match....Fixes compilation with Guile 2.1. Reported by Mu Lei. * guix/ui.scm (report-load-error) (warn-about-load-error, read/eval-package-expression): Use 'rest' instead of '_' as the pattern variable name. * gnu/packages.scm (%find-package): Likewise. * guix/scripts/build.scm (transform-package-inputs): Likewise. * guix/scripts/hash.scm (guix-hash): Likewise. * guix/scripts/import/gnu.scm (%options, guix-import-gnu): Likewise. * guix/scripts/import/nix.scm (guix-import-nix): Likewise. * guix/scripts/offload.scm (build-machines): Likewise. * guix/scripts/refresh.scm (%options): Likewise. * guix/scripts/substitute.scm (narinfo-signature->canonical-sexp): Likewise. Ludovic Courtès
2016-09-06packages: Add 'package-superseded' and associated support....This provides a way to mark a package as superseded by another one. Upgrades replace superseded packages with their replacement. * guix/packages.scm (package-superseded, deprecated-package): New procedures. * gnu/packages.scm (%find-package): Check for 'package-superseded'. * guix/scripts/package.scm (transaction-upgrade-entry)[supersede]: New procedure. Call it when 'package-superseded' is true. * tests/guix-build.sh: Add test for a superseded package. * tests/packages.scm ("package-superseded") ("transaction-upgrade-entry, superseded package"): New tests. Ludovic Courtès
2016-07-28packages: Add 'hidden-package'....* guix/packages.scm (hidden-package, hidden-package?): New procedures. * gnu/packages.scm (fold-packages): Filter out 'hidden-package?'. * tests/packages.scm ("hidden-package"): New test. Ludovic Courtès
2016-06-20packages: Export 'scheme-modules'....* gnu/packages.scm (package-modules): Rename to... (scheme-modules): ... this. Export. Update callers. Ludovic Courtès
2016-05-04utils: Move combinators to (guix combinators)....* guix/utils.scm (compile-time-value, memoize, fold2) (fold-tree, fold-tree-leaves): Move to... * guix/combinators: ... here. New file. * tests/utils.scm ("fold2, 1 list", "fold2, 2 lists") (fold-tree tests): Move to... * tests/combinators.scm: ... here. New file. * Makefile.am (MODULES, SCM_TESTS): Add them. * gnu/packages.scm, gnu/packages/bootstrap.scm, gnu/services/herd.scm, guix/build-system/gnu.scm, guix/build-system/python.scm, guix/derivations.scm, guix/gnu-maintenance.scm, guix/import/elpa.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/graph.scm, guix/scripts/lint.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/serialization.scm, guix/store.scm, guix/ui.scm: Adjust imports accordingly. Ludovic Courtès
2016-04-14packages: Add 'search-patches'....* gnu/packages.scm (search-patches): New macro. Alex Kost
2016-03-08packages: Gracefully report packages not found....Fixes a thinko introduced in 1b846da8c372bee78851439fd9e72b2499115e5a that would lead to a backtrace when looking for an unknown package. * gnu/packages.scm (%find-package): Correct logic when checking for FALLBACK?. Ludovic Courtès
2016-03-08packages: Support the deprecated "NAME-VERSION" syntax....Fixes a typo introduced in 1b846da8c372bee78851439fd9e72b2499115e5a that would lead to a backtrace when using the deprecated syntax. * gnu/packages.scm (%find-package): Turn the first argument to 'call-with-values' into a thunk. Use #:select instead of '@' to select the right 'package-name->name+version' procedure. Ludovic Courtès
2016-03-08packages: Clarify NAME-VERSION deprecation message....* gnu/packages.scm (%find-package): Clarify message; remove trailing period. Ludovic Courtès
2016-03-02utils: Use '@' for separating package names and version numbers....This provides the ability to use numbers in package names. Fixes <http://bugs.gnu.org/19219>. * guix/utils.scm (package-name->name+version): New procedure. * gnu/packages.scm (%find-package): Add a FALLBACK? keyword argument. Use the previous method when no package is found. (specification->package+output, specification->package): Adapt documentation to new syntax. * doc/guix.texi (Invoking guix package, Invoking guix import): Likewise. * guix/ui.scm (package-specification->name+version+output): Likewise. * guix/scripts/import/hackage.scm (show-help): Likewise. * tests/guix-build.sh: Adapt to new syntax. * tests/guix-lint.sh: Likewise. * tests/guix-package.sh: Likewise. * tests/ui.scm ("package-specification->name+version+output"): Likewise. * tests/utils.scm ("package-name->name+version"): Likewise. * NEWS: Mention new syntax. Mathieu Lirzin
2016-03-02packages: Factorize package specification search....* gnu/packages.scm (%find-package): New procedure. (specification->package, specification->package+output): Use it. Mathieu Lirzin
2016-02-24Do not check package freshness during upgrade....Fixes <http://bugs.gnu.org/22740>. Reported by Andreas Enge <andreas@enge.fr>. * gnu/packages.scm (waiting, ftp-open*, check-package-freshness): Remove. * guix/scripts/package.scm (options->installable): Adjust accordingly. * emacs/guix-main.scm (package->manifest-entry*): Likewise. Alex Kost
2015-12-20packages: Remove now redundant graph procedures....These procedures are now redundant with those in (guix graph) and are no longer used since commit a51cbecb. * gnu/packages.scm (vhash-refq, package-dependencies) (package-direct-dependents, package-transitive-dependents) (package-covering-dependents): Remove. Ludovic Courtès
2015-10-21packages: Update 'check-package-freshness' to use (guix upstream)....This is a followup to 0a7c5a0. Reported by Efraim Flashner <efraim@flashner.co.il>. * gnu/packages.scm (check-package-freshness): Update to the new (guix upstream) interface. Ludovic Courtès
2015-06-18Move 'specification->package+output' to (gnu packages)....* guix/scripts/package.scm (specification->package+output): Move to... * gnu/packages.scm (specification->package+output): ... here * guix/scripts/archive.scm (guix): Adjust accordingly. Ludovic Courtès
2015-04-18packages: Allow package lookups with version prefixes....* gnu/packages.scm (find-packages-by-name): Sort MATCHING according to 'version>?'. Use 'string-prefix?' instead of 'string=?' to compare against VERSION. * doc/guix.texi (Invoking guix package): Add example and explanation. Ludovic Courtès
2015-04-08Merge branch 'master' into core-updates宋文武
2015-04-07gnu: Emit a warning when a package module cannot be loaded....* guix/ui.scm (warn-about-load-error): New procedure. * gnu/packages.scm (package-modules): Wrap 'resolve-interface' call in 'catch #t', and call 'warn-about-load-error' in handler. Ludovic Courtès
2015-04-03packages: Fix typo....* gnu/packages.scm: Fix the name of an exported variable (%patch-path). Alex Kost