summaryrefslogtreecommitdiff
path: root/gnu/packages.scm
AgeCommit message (Collapse)Author
2016-03-08packages: Gracefully report packages not found.Ludovic Courtès
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?.
2016-03-08packages: Support the deprecated "NAME-VERSION" syntax.Ludovic Courtès
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.
2016-03-08packages: Clarify NAME-VERSION deprecation message.Ludovic Courtès
* gnu/packages.scm (%find-package): Clarify message; remove trailing period.
2016-03-02utils: Use '@' for separating package names and version numbers.Mathieu Lirzin
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.
2016-03-02packages: Factorize package specification search.Mathieu Lirzin
* gnu/packages.scm (%find-package): New procedure. (specification->package, specification->package+output): Use it.
2016-02-24Do not check package freshness during upgrade.Alex Kost
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.
2015-12-20packages: Remove now redundant graph procedures.Ludovic Courtès
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.
2015-10-21packages: Update 'check-package-freshness' to use (guix upstream).Ludovic Courtès
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.
2015-06-18Move 'specification->package+output' to (gnu packages).Ludovic Courtès
* guix/scripts/package.scm (specification->package+output): Move to... * gnu/packages.scm (specification->package+output): ... here * guix/scripts/archive.scm (guix): Adjust accordingly.
2015-04-18packages: Allow package lookups with version prefixes.Ludovic Courtès
* 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.
2015-04-08Merge branch 'master' into core-updates宋文武
2015-04-07gnu: Emit a warning when a package module cannot be loaded.Ludovic Courtès
* 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.
2015-04-03packages: Fix typo.Alex Kost
* gnu/packages.scm: Fix the name of an exported variable (%patch-path).
2015-01-26gnu: Raise an error when a bootstrap binary is not found.Ludovic Courtès
* gnu/packages.scm (search-bootstrap-binary): Raise an error when FILE-NAME is not found.
2015-01-20gnu: 'search-patch' raises an error when a patch is not found.Ludovic Courtès
* 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.
2015-01-03gnu: Search for patches under $GUIX_PACKAGE_PATH.Ludovic Courtès
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.
2014-12-21packages: Sort Scheme file lists used by 'fold-packages'.Ludovic Courtès
* gnu/packages.scm (scheme-files): Call 'sort' on result.
2014-11-11gnu-maintenance: Introduce <gnu-release> data type.Ludovic Courtès
* 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.
2014-09-29packages: Optimize 'find-packages-by-name' to avoid disk accesses.Ludovic Courtès
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*'.
2014-09-24Introduce the 'GUIX_PACKAGE_PATH' environment variable.Ludovic Courtès
* 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.
2014-09-24packages: Add '%package-module-search-path'.Ludovic Courtès
* gnu/packages.scm (%package-module-path): New variable. (all-package-modules): New procedure. (fold-packages): Use it instead of 'package-modules'.
2014-09-24packages: Generalize package module search.Ludovic Courtès
* 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.
2014-09-03Move specification->package to gnu/packages.scm.Cyril Roelandt
* guix/scripts/build.scm (specification->package): Move from here... * gnu/packages.scm: ... to here.
2014-08-20Move 'check-package-freshness' from 'guix package' to 'packages'.Alex Kost
* 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>
2014-08-19packages: Remove dead code.Alex Kost
* gnu/packages.scm (_): Remove. Remove an extra space. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-07-20guix: refresh: Add --list-dependent option.Eric Bavier
* 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.
2013-12-21Factorize package search between 'guix package' and 'guix build'.Ludovic Courtès
* 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.
2013-04-21ui: Add a 'define-diagnostic' macro.Nikita Karetnikov
* 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'.
2013-04-14utils: Add `fold2'.Ludovic Courtès
* 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.
2013-03-22store: Really disable file name canonicalization for derivation inputs.Ludovic Courtès
* 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.
2013-03-21gnu: Disable file name canonicalization in `search-*'.Ludovic Courtès
* gnu/packages.scm (search-patch, search-bootstrap-binary): Make sure no canonicalization occurs. This reduces the number of 'stat' system calls.
2013-02-13Build newest versions unless specified, and implement upgrades.Mark H Weaver
* gnu/packages.scm (find-newest-available-packages): New exported procedure. * guix-build.in (newest-available-packages, find-best-packages-by-name): New procedures. (find-package): Use find-best-packages-by-name, to guarantee that if a version number is not specified, only the newest versions will be considered. * guix-package.in (%options): Add --upgrade/-u option. (newest-available-packages, find-best-packages-by-name, upgradeable?): New procedures. (find-package): Use find-best-packages-by-name, to guarantee that if a version number is not specified, only the newest versions will be considered. (process-actions): Implement upgrade option. * doc/guix.texi (Invoking guix-package): In the description of --install, mention that if no version number is specified, the newest available version will be selected.
2013-02-13Inhibit duplicates in fold-packages.Mark H Weaver
* gnu/packages.scm (fold2): New procedure. (fold-packages): Rework to suppress duplicates.
2013-01-18distro: Rename (distro) to (gnu packages).Ludovic Courtès
* distro.scm: Rename to... * gnu/packages.scm: ... this. Update all users accordingly. * Makefile.am (MODULES): Adjust accordingly. * po/POTFILES.in: Likewise.