summaryrefslogtreecommitdiff
path: root/gnu/packages.scm
Commit message (Collapse)AuthorAge
* Add (guix describe) and use it to initialize '%package-search-path'.Ludovic Courtès2018-09-02
| | | | | | | | | * 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)).
* packages: 'find-packages-by-name' properly honors version prefixes.Ludovic Courtès2018-05-13
| | | | | | | | 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?'.
* discovery: Remove dependency on (guix ui).Ludovic Courtès2018-04-08
| | | | | | | | | | | | | | 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.
* Add (guix self).Ludovic Courtès2018-04-08
| | | | | | | | * 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'.
* packages: 'fold-packages' takes #:select? parameter.Ludovic Courtès2017-11-07
| | | | * gnu/packages.scm (fold-packages): Add #:select? parameter and honor it.
* packages: 'fold-packages' takes an optional 'modules' parameter.Ludovic Courtès2017-09-01
| | | | | | | Suggested by Christopher Baines <mail@cbaines.net>. * gnu/packages.scm (fold-packages): Add optional 'modules' parameter and honor it.
* packages: Add 'specifications->manifest'.Ludovic Courtès2017-06-11
| | | | | | | * 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'.
* Add (guix discovery).Ludovic Courtès2017-05-03
| | | | | | | | | | * 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.
* ui: Rename '_' to 'G_'.Ludovic Courtès2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`".
* packages: Remove support for PACKAGE-VERSION deprecated syntax.Ludovic Courtès2017-05-01
| | | | | | | | 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.
* packages: Use PACKAGE@VERSION syntax when reporting ambiguities.Ludovic Courtès2017-03-08
| | | | | * gnu/packages.scm (%find-package): Upon ambiguity, use the PACKAGE@VERSION syntax instead of 'package-full-name'.
* packages: Add 'search-auxiliary-file'.Alex Kost2017-02-27
| | | | | | | | 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.
* Use 'mlambda' instead of 'memoize'.Ludovic Courtès2017-01-28
| | | | | | | | | | | | | | | | | * 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.
* Add (guix memoization).Ludovic Courtès2017-01-28
| | | | | | | | | | | | | * 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.
* ui: Do not shadow '_' where it's used as a literal syntax match.Ludovic Courtès2016-09-20
| | | | | | | | | | | | | | | | | | 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.
* packages: Add 'package-superseded' and associated support.Ludovic Courtès2016-09-06
| | | | | | | | | | | | | | 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.
* packages: Add 'hidden-package'.Ludovic Courtès2016-07-28
| | | | | | * 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.
* packages: Export 'scheme-modules'.Ludovic Courtès2016-06-20
| | | | | * gnu/packages.scm (package-modules): Rename to... (scheme-modules): ... this. Export. Update callers.
* utils: Move combinators to (guix combinators).Ludovic Courtès2016-05-04
| | | | | | | | | | | | | | | | | | | * 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.
* packages: Add 'search-patches'.Alex Kost2016-04-14
| | | | * gnu/packages.scm (search-patches): New macro.
* packages: Gracefully report packages not found.Ludovic Courtès2016-03-08
| | | | | | | | 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?.
* packages: Support the deprecated "NAME-VERSION" syntax.Ludovic Courtès2016-03-08
| | | | | | | | | 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.
* packages: Clarify NAME-VERSION deprecation message.Ludovic Courtès2016-03-08
| | | | | * gnu/packages.scm (%find-package): Clarify message; remove trailing period.
* utils: Use '@' for separating package names and version numbers.Mathieu Lirzin2016-03-02
| | | | | | | | | | | | | | | | | | | | | 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.
* packages: Factorize package specification search.Mathieu Lirzin2016-03-02
| | | | | * gnu/packages.scm (%find-package): New procedure. (specification->package, specification->package+output): Use it.
* Do not check package freshness during upgrade.Alex Kost2016-02-24
| | | | | | | | | 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.
* packages: Remove now redundant graph procedures.Ludovic Courtès2015-12-20
| | | | | | | | | 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.
* packages: Update 'check-package-freshness' to use (guix upstream).Ludovic Courtès2015-10-21
| | | | | | | | 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.
* Move 'specification->package+output' to (gnu packages).Ludovic Courtès2015-06-18
| | | | | | * guix/scripts/package.scm (specification->package+output): Move to... * gnu/packages.scm (specification->package+output): ... here * guix/scripts/archive.scm (guix): Adjust accordingly.
* packages: Allow package lookups with version prefixes.Ludovic Courtès2015-04-18
| | | | | | | * 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.
* Merge branch 'master' into core-updates宋文武2015-04-08
|\
| * packages: Fix typo.Alex Kost2015-04-03
| | | | | | | | * gnu/packages.scm: Fix the name of an exported variable (%patch-path).
* | gnu: Emit a warning when a package module cannot be loaded.Ludovic Courtès2015-04-07
|/ | | | | | * 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.
* gnu: Raise an error when a bootstrap binary is not found.Ludovic Courtès2015-01-26
| | | | | * gnu/packages.scm (search-bootstrap-binary): Raise an error when FILE-NAME is not found.
* gnu: 'search-patch' raises an error when a patch is not found.Ludovic Courtès2015-01-20
| | | | | | | * gnu/packages.scm (search-patch): Raise an error condition when 'search-path' returns #f. * tests/packages.scm ("patch not found yields a run-time error"): New test.
* gnu: Search for patches under $GUIX_PACKAGE_PATH.Ludovic Courtès2015-01-03
| | | | | | | | | | | Fixes <http://bugs.gnu.org/19364>. Reported by Tomáš Čech <sleep_walker@suse.cz> and Mark H Weaver <mhw@netris.org>. * gnu/packages.scm (%patch-path): Move after definition of %package-module-path'. Append "/gnu/packages/patches" only to %DISTRO-ROOT-DIRECTORY. * tests/guix-package.sh: Add 'emacs-foo-bar-patched' test.
* packages: Sort Scheme file lists used by 'fold-packages'.Ludovic Courtès2014-12-21
| | | | * gnu/packages.scm (scheme-files): Call 'sort' on result.
* gnu-maintenance: Introduce <gnu-release> data type.Ludovic Courtès2014-11-11
| | | | | | | | | | | | * guix/gnu-maintenance.scm (<gnu-release>): New record type. (release-file): Rename to... (release-file?): ... this. Return a Boolean. (tarball->version, coalesce-releases): New procedures. (releases): Call 'coalesce-releases' on RESULT. Return <gnu-release> objects instead of pairs. (latest-release): Likewise. (package-update-path): Adjust accordingly. * gnu/packages.scm (check-package-freshness): Adjust accordingly.
* packages: Optimize 'find-packages-by-name' to avoid disk accesses.Ludovic Courtès2014-09-29
| | | | | | | | On a profile with 182 entries, "guix package --search-paths" goes from 4.5 seconds down to 0.4 second. * gnu/packages.scm (find-packages-by-name): Make a name -> package vhash in a promise; access it with 'vhash-fold*'.
* Introduce the 'GUIX_PACKAGE_PATH' environment variable.Ludovic Courtès2014-09-24
| | | | | | | * gnu/packages.scm (%package-module-path): Honor $GUIX_PACKAGE_PATH. * test-env.in: Unset 'GUIX_PACKAGE_PATH'. * tests/guix-package.sh: Test it. * doc/guix.texi (Package Modules): Document it.
* packages: Add '%package-module-search-path'.Ludovic Courtès2014-09-24
| | | | | | * gnu/packages.scm (%package-module-path): New variable. (all-package-modules): New procedure. (fold-packages): Use it instead of 'package-modules'.
* packages: Generalize package module search.Ludovic Courtès2014-09-24
| | | | | | | | | | | * gnu/packages.scm (%distro-root-directory): New variable. (%distro-module-directory): Remove. (package-files): Rename to... (scheme-files): ... this. Return absolute file names, not stripped. (file-name->module-name): New procedure. (package-modules): Add 'directory' and 'sub-directory' parameters. Rewrite accordingly. (fold-packages): Adjust 'package-modules' call accordingly.
* Move specification->package to gnu/packages.scm.Cyril Roelandt2014-09-03
| | | | | * guix/scripts/build.scm (specification->package): Move from here... * gnu/packages.scm: ... to here.
* Move 'check-package-freshness' from 'guix package' to 'packages'.Alex Kost2014-08-20
| | | | | | | | * guix/scripts/package.scm (%sigint-prompt, call-with-sigint-handler) (waiting, ftp-open*, check-package-freshness): Move to... * gnu/packages.scm: ... here. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* packages: Remove dead code.Alex Kost2014-08-19
| | | | | | | * gnu/packages.scm (_): Remove. Remove an extra space. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix: refresh: Add --list-dependent option.Eric Bavier2014-07-20
| | | | | | | | | * guix/packages.scm (package-direct-inputs): New procedure. * gnu/packages.scm (vhash-refq, package-direct-dependents) (package-transitive-dependents, package-covering-dependents): New procedures. * guix/scripts/refresh.scm (%options, show-help, guix-refresh): Add --list-dependent option. * doc/guix.texi (Invoking guix refresh): Document '--list-dependent' option.
* Factorize package search between 'guix package' and 'guix build'.Ludovic Courtès2013-12-21
| | | | | | | | | | * guix/scripts/package.scm (newest-available-packages): Remove. (find-best-packages-by-name): Move to... * gnu/packages.scm (find-best-packages-by-name): ... here. (find-newest-available-packages): Memoize. * guix/scripts/build.scm (specification->package): New procedure, formerly called 'find-package' within 'guix-build'. (guix-build): Adjust accordingly.
* ui: Add a 'define-diagnostic' macro.Nikita Karetnikov2013-04-21
| | | | | | | | | | | | | | | | | * guix/ui.scm (define-diagnostic): New macro, which is based on the previous version of 'warning'. (warning, leave): Redefine using 'define-diagnostic'. (report-error): New macro. (install-locale): Use 'warning' instead of 'format'. (call-with-error-handling): Adjust 'leave'. * gnu/packages.scm (package-files): Use 'warning' instead of 'format'. * guix/gnu-maintenance.scm (http-fetch): Use 'warning' and 'leave'. * guix/scripts/build.scm (derivations-from-package-expressions, guix-build): Adjust 'leave'. * guix/scripts/download.scm (guix-download): Adjust 'leave'. * guix/scripts/gc.scm (size->number, %options): Adjust 'leave'. * guix/scripts/package.scm (roll-back, guix-package): Adjust 'leave'. * po/POTFILES.in: Add 'guix/gnu-maintenance.scm'.
* utils: Add `fold2'.Ludovic Courtès2013-04-14
| | | | | | | * gnu/packages.scm (fold2): Remove. * guix/utils.scm (fold2): New procedure. Generalization of the above to one and two lists. * tests/utils.scm ("fold2, 1 list", "fold2, 2 lists"): New tests.
* store: Really disable file name canonicalization for derivation inputs.Ludovic Courtès2013-03-22
| | | | | | | * guix/store.scm (write-contents)[call-with-binary-input-file]: Set %FILE-PORT-NAME-CANONICALIZATION to #f. * gnu/packages.scm (search-patch, search-bootstrap-binary): Leave %FILE-PORT-NAME-CANONICALIZATION unchanged. This reverts 9776ebb.