summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
AgeCommit message (Collapse)Author
2016-05-27guix package: Inherit the transformed version number.Ludovic Courtès
Previously, 'guix package -i emacs --with-source=./emacs-42.tar.gz' would fail to use "42" as the version number in the manifest entry. Reported by piyo on #guix. * guix/scripts/package.scm (process-actions)[transform-entry]: Inherit the version number from the result of TRANSFORM when it's a package. * tests/guix-package.sh: Test it.
2016-04-04emacs: Use 'build-and-use-profile' from (guix scripts package).Alex Kost
* guix/scripts/package.scm: Export 'build-and-use-profile'. * emacs/guix-main.scm (process-package-actions): Use it.
2016-03-02guix build: Move '--no-grafts' to the common build options.Ludovic Courtès
* guix/scripts/build.scm (%options): Move --no-grafts to... (%standard-build-options): ... here. (show-help, show-build-options-help): Adjust accordingly. * guix/scripts/archive.scm (%default-options): Add 'graft?'. (guix-archive): Parametrize '%graft?'. * guix/scripts/environment.scm (%default-options): Add 'graft?'. (guix-environment): Parametrize '%graft?'. * guix/scripts/package.scm (%default-options): Add 'graft?'. (guix-package): Parametrize '%graft?'. * guix/scripts/system.scm (%default-options): Add 'graft?'. (guix-system): Parametrize 'graft?'. * doc/guix.texi (Additional Build Options): Move --no-grafts to... (Common Build Options): ... here.
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.
2016-02-01guix package: Support package transformation options.Ludovic Courtès
* guix/scripts/package.scm (show-help): Call 'show-transformation-options-help'. (%options): Append %TRANSFORMATION-OPTIONS. (process-actions)[transform, transform-entry]: New procedures. * doc/guix.texi (Invoking guix package): Mention package transformations. (Package Transformation Options): Mention 'guix package'.
2016-01-05guix package: Allow multiple '--search' flags.Ludovic Courtès
* guix/scripts/package.scm (find-packages-by-description): Change 'rx' parameter to 'regexps'. [matches-all?, matches-one?]: New procedures. Use them. (process-query): Collect regexps from all 'search' queries, and pass them to 'find-packages-by-description'. * tests/guix-package.sh: Add tests. * doc/guix.texi (Invoking guix package): Document it.
2015-12-25guix package: Fix typo in comment.Leo Famulari
* guix/scripts/package.scm: Fix typo.
2015-12-01guix package: Refactor 'options->installable'.Ludovic Courtès
* guix/scripts/package.scm (options->upgrade-predicate) (store-item->manifest-entry): New procedures. * guix/scripts/package.scm (options->installable): Use them. Remove the 'packages-to-upgrade' and 'packages-to-install' variables by getting rid of a level of indirection.
2015-12-01guix package: Move 'process-actions' out of sight.Ludovic Courtès
* guix/scripts/package.scm (process-actions): New procedure, moved from... (guix-package): ... here. Adjust accordingly.
2015-12-01guix package: Formalize the list of actions.Ludovic Courtès
* guix/scripts/package.scm (roll-back-action, switch-generation-action) (delete-generations-action, manifest-action): New procedures. (%actions): New variable. * guix/scripts/package.scm (guix-package)[process-action]: Rewrite to traverse %ACTIONS.
2015-12-01guix package: Move 'build-and-use-profile' out of sight.Ludovic Courtès
* guix/scripts/package.scm (build-and-use-profile): New procedure. Adapted and moved from... (guix-package)[process-actions]: ... here. Adjust call sites.
2015-12-01guix package: Move a couple of procedures out of sight.Ludovic Courtès
* guix/scripts/package.scm (ensure-default-profile, process-query): New procedures, moved from... (guix-package): ... here.
2015-12-01guix package: Remove unnecessary use of (%store).Ludovic Courtès
* guix/scripts/package.scm (delete-matching-generations): Use STORE instead of (%store).
2015-11-24guix package: Reduce startup time by ~50%.Ludovic Courtès
As measured with: time sh -c 'for i in `seq 1 10` ; do guix package --search-paths ; done' On my machine, when running: strace -o ,,s guix package --search-paths the number returned by: grep -E '^(open|l?stat).*\.go' ,,s | wc -l drops from 1610 to 837. * guix/scripts/package.scm: Remove two unnecessary #:use-module forms. Autoload (gnu packages ...) modules.
2015-11-11guix package: '--search-paths' can report combined search paths.Ludovic Courtès
Partly fixes <http://bugs.gnu.org/20255>. * guix/scripts/package.scm (search-path-environment-variables): Change 'profile' to 'profiles'; expect it to be a list. (display-search-paths): Likewise. (%default-options): Remove 'profile' entry. (%options) <--profile>: Keep previous values associated with 'profile' in RESULT. (guix-package)[process-actions, process-query]: Handle the possible lack of 'profile' pair in OPTS.
2015-10-28ui: Add 'make-regexp*'.Ludovic Courtès
Fixes <http://bugs.gnu.org/21773>. Reported by Jan Synáček <jan.synacek@gmail.com>. * guix/ui.scm (make-regexp*): New procedure. * guix/scripts/package.scm (options->installable, guix-package): Use it when processing user-provided regexps.
2015-10-27profiles: Add generation manipulation procedures.Ludovic Courtès
* guix/scripts/package.scm (delete-generations): Use 'delete-generation*' instead of 'delete-generation'. (guix-package)[process-actions]: Use 'roll-back*' instead of 'roll-back' and 'switch-to-generation*' instead of 'switch-to-generation'. (link-to-empty-profile, switch-to-generation, switch-to-previous-generation, roll-back, delete-generation): Move to... * guix/profiles.scm: ... here. Adjust to not print messages and to return values that can be used by user interfaces. * guix/ui.scm (display-generation-change, roll-back*, switch-to-generation*, delete-generation*): New procedures.
2015-10-27ui: Add procedures to display a profile generation.Ludovic Courtès
* guix/scripts/package.scm (guix-package)[process-query](list-generations): Move part of the body to 'delete-generation' and 'display-profile-content'. * guix/ui.scm (display-generation, display-profile-content): New procedures.
2015-10-27utils: Add 'readlink*'.Ludovic Courtès
* guix/scripts/package.scm (readlink*): Move to... * guix/utils.scm (readlink*): ... here. New procedure.
2015-10-27ui: Add 'matching-generations'.Ludovic Courtès
* guix/scripts/package.scm (matching-generations): Move to... * guix/ui.scm (matching-generations): ... here.
2015-09-18Add (guix scripts).Alex Kost
* guix/ui.scm: Add missing copyright lines. (args-fold*, environment-build-options, %default-argument-handler, parse-command-line): Move to ... * guix/scripts.scm: ...here. New file. * guix/scripts/archive.scm: Use it. * guix/scripts/build.scm: Likewise. * guix/scripts/download.scm: Likewise. * guix/scripts/edit.scm: Likewise. * guix/scripts/environment.scm: Likewise. * guix/scripts/gc.scm: Likewise. * guix/scripts/graph.scm: Likewise. * guix/scripts/hash.scm: Likewise. * guix/scripts/import/cpan.scm: Likewise. * guix/scripts/import/cran.scm: Likewise. * guix/scripts/import/elpa.scm: Likewise. * guix/scripts/import/gem.scm: Likewise. * guix/scripts/import/gnu.scm: Likewise. * guix/scripts/import/hackage.scm: Likewise. * guix/scripts/import/nix.scm: Likewise. * guix/scripts/import/pypi.scm: Likewise. * guix/scripts/lint.scm: Likewise. * guix/scripts/package.scm: Likewise. * guix/scripts/publish.scm: Likewise. * guix/scripts/pull.scm: Likewise. * guix/scripts/refresh.scm: Likewise. * guix/scripts/size.scm: Likewise. * guix/scripts/system.scm: Likewise. * tests/ui.scm (with-environment-variable, "parse-command-line", "parse-command-line and --no options"): Move to ... * tests/scripts.scm: ...here. New file. * Makefile.am (MODULES): Add guix/scripts.scm. (SCM_TESTS): Add tests/scripts.scm. * po/guix/POTFILES.in: Add guix/scripts.scm.
2015-08-19scripts: package: Add --install-from-file option.David Thompson
* guix/scripts/package.scm (show-help): Add help text for --install-from-file option. (%options): Add --install-from-file option. * tests/guix-package.sh: Test it. * doc/guix.texi ("invoking guix package"): Document it. * doc/package-hello.scm: New file. * doc.am (EXTRA_DIST): Add it.
2015-07-15ui: Add 'leave-on-EPIPE'.Ludovic Courtès
* guix/scripts/package.scm (leave-on-EPIPE): Move to... * guix/ui.scm (leave-on-EPIPE): ... here.
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-06-08guix: Clean up --help messages.Alex Kost
* guix/scripts/import.scm (show-help): Add newline before a list of importers. * guix/scripts/lint.scm (show-help): Split a long description line. * guix/scripts/package.scm (show-help): Improve docstrings for --install and --remove options. * guix/scripts/system.scm (show-help): Format actions the same way as guix commands and importers are formatted.
2015-06-06guix package: Fix typo in --help message.Alex Kost
* guix/scripts/package.scm (show-help): Align '--show' option properly.
2015-05-29emacs: Report about "search paths" after operation.Alex Kost
* guix/scripts/package.scm: Export 'display-search-paths'. * emacs/guix-main.scm (process-package-actions): Use it.
2015-05-25guix package: --manifest DTRT when combined with --dry-run.Ludovic Courtès
* guix/scripts/package.scm (guix-package)[process-actions]: Process 'manifest action regardless of whether 'dry-run? is set. Adjust the message accordingly. * tests/guix-package.sh: Add error-reporting test.
2015-05-21guix package: Adjust --help message.Ludovic Courtès
* guix/scripts/package.scm (show-help): Add KIND parameter for --search-paths as a followup to dbc31ab.
2015-05-20package: Add --manifest option.David Thompson
* guix/scripts/package.scm (show-help): Add help text. (%options): Add manifest option. (guix-package): Add manifest option handler. * doc/guix.texi ("Invoking guix package"): Document it. * tests/guix-package.sh: Add test.
2015-05-20guix package: Add optional argument to --search-paths.Ludovic Courtès
* guix/scripts/package.scm (search-path-environment-variables): Add #:kind parameter. Pass it to 'environment-variable-definition'. (display-search-paths): Add #:kind parameter and pass it to 'search-path-environment-variables'. (%options): Add an optional parameter for "--search-paths". (guix-package)[process-query]: Handle it. * tests/guix-package-net.sh: Adjust existing test. * tests/guix-package.sh: Adjust existing tests and add new test. * doc/guix.texi (Invoking guix package): Document it.
2015-05-20guix package: --search-paths mentions $PATH.Ludovic Courtès
* guix/scripts/package.scm (search-path-environment-variables): Add $PATH to SEARCH-PATHS.
2015-05-05search-paths: 'evaluate-search-paths' can be passed a list of directories.Ludovic Courtès
* guix/search-paths.scm (evaluate-search-paths): Change 'directory' to 'directories', and adjust 'search-path-as-list' accordingly. * guix/scripts/package.scm (search-path-environment-variables): Adjust call accordingly.
2015-05-04search-paths: 'evaluate-search-paths' now returns spec/value pairs.Ludovic Courtès
* guix/search-paths.scm (evaluate-search-paths): Return specification/value pairs instead of variable/value pairs. * guix/scripts/package.scm (search-path-environment-variables): Adjust accordingly. Pass #:separator to 'environment-variable-definition'.
2015-05-04search-paths: Add 'environment-variable-definition'.Ludovic Courtès
* guix/search-paths.scm (environment-variable-definition): New variable. * guix/scripts/package.scm (search-path-environment-variables): Use it.
2015-05-04search-paths: Add 'evaluate-search-paths', from (guix scripts package).Ludovic Courtès
* guix/scripts/package.scm (with-null-error-port, evaluate-search-paths): Move to... * guix/search-paths.scm: ... here. * guix/utils.scm (string-tokenize*): Move to... * guix/search-paths.scm: ... here. * tests/utils.scm ("string-tokenize*"): Adjust accordingly.
2015-05-04Move search path specifications to (guix search-paths).Ludovic Courtès
* guix/packages.scm (<search-path-specification>, search-path-specification->sexp, sexp->search-path-specification): Move to... * guix/search-paths.scm: ... here. New file. * Makefile.am (MODULES): Add it. * guix/build-system/cmake.scm, guix/build-system/glib-or-gtk.scm, guix/build-system/gnu.scm, guix/build-system/haskell.scm, guix/build-system/perl.scm, guix/build-system/python.scm, guix/build-system/ruby.scm, guix/build-system/waf.scm, guix/profiles.scm, guix/scripts/package.scm: Use it.
2015-05-04guix package: Introduce 'evaluate-search-paths'.Ludovic Courtès
* guix/scripts/package.scm (evaluate-search-paths): New procedure, with most of the code formerly in 'search-path-environment-variables'. (search-path-environment-variables): Use it.
2015-05-04guix package: Move profile cleaning out of 'search-path-environment-variables'.Ludovic Courtès
* guix/scripts/package.scm (user-friendly-profile): New procedure. (search-path-environment-variables): Remove 'profile' local variable. (display-search-paths): Explicitly call 'user-friendly-profile' for the argument to 'search-path-environment-variables'. (guix-package)[process-query]: Likewise.
2015-05-02profiles: Store search paths in manifests.Ludovic Courtès
Discussed in <http://bugs.gnu.org/20255>. * guix/packages.scm (sexp->search-path-specification): New variable. * guix/profiles.scm (<manifest-entry>)[search-paths]: New field. (package->manifest-entry): Initialize it. (manifest->gexp): Match it. Wrap #$deps in (propagated-inputs ...). Emit (search-paths ...). Increment version. (find-package): New procedure. (sexp->manifest)[infer-search-paths]: New procedure. Use it to initialize the 'search-paths' field for versions 0 and 1. Add case for version 2. * guix/scripts/package.scm (search-path-environment-variables)[manifest-entry->package]: Remove. Use 'manifest-entry-search-paths' instead of 'manifest-entry->package' plus 'package-native-search-paths'. * tests/profiles.scm ("profile-manifest, search-paths"): New test.
2015-04-19guix package: Fix 'readlink*' implementation.Ludovic Courtès
* guix/scripts/package.scm (readlink*): Fix to handle symlinks with relative targets. Taken from ld-wrapper2.in.
2015-04-19guix package: -A and -s take supported systems into account.Ludovic Courtès
* guix/scripts/package.scm (guix-package)[process-query] <list-available>: Restrict results to packages matching 'supported-package?". * guix/ui.scm (package->recutils): Print "systems:". * tests/guix-package.sh: Add tests. * doc/guix.texi (Invoking guix package): Adjust description of '--list-available' accordingly.
2015-04-15profiles: Generalize "hooks" for 'profile-derivation'.Ludovic Courtès
* guix/profiles.scm (info-dir-file): Remove (null? (manifest-entries manifest)) test. (ca-certificate-bundle): Likewise. (ghc-package-cache-file): Turn 'if' into 'and', and remove second arm. (%default-profile-hooks): New variable. (profile-derivation): Remove #:info-dir?, #:ghc-package-cache?, and #:ca-certificate-bundle?. Add #:hooks. Iterate over HOOKS. Adjust 'inputs' accordingly. * guix/scripts/package.scm (guix-package): Adjust 'profile-derivation' call accordingly. * tests/packages.scm ("--search-paths with pattern"): Likewise. * tests/profiles.scm ("profile-derivation", "profile-derivation, inputs"): Likewise.
2015-04-14guix package: Add '--do-not-upgrade' option.Mark H Weaver
* guix/scripts/package.scm (%options): Add the '--do-not-upgrade' option. (show-help): Document it. (options->installable): Add 'do-not-upgrade-regexps' variable. Use it in 'packages-to-upgrade'. * doc/guix.texi (Invoking guix package): Document the '--do-not-upgrade' option.
2015-04-08profiles: Generate GHC's package database cache.Federico Beffa
* guix/profiles.scm (ghc-package-cache-file): New procedure. (profile-derivation): Add 'ghc-package-cache?' keyword argument. If true (the default), add the result of 'ghc-package-cache-file' to 'inputs'. * guix/scripts/package.scm (guix-package)[process-actions]: Pass #:ghc-package-cache? to 'profile-generation'. * tests/packages.scm ("--search-paths with pattern"): Likewise. * tests/profiles.scm ("profile-derivation"): Likewise.
2015-04-06guix package: Avoid 'exit' calls in 'delete-matching-generations'.Ludovic Courtès
* guix/scripts/package.scm (delete-matching-generations): Remove call to 'exit' when PATTERN is "0". Call 'leave' instead of 'exit' when (null-list? number).
2015-04-06guix package: Never remove the current generation and warn about it.Ludovic Courtès
Fixes <http://bugs.gnu.org/19978>. Reported by taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer). * guix/scripts/package.scm (delete-matching-generations): Warn when CURRENT is in NUMBERS, and always remove it before calling 'delete-generations'. * tests/guix-package.sh: Add --switch-generation=2 invocation before --delete-generations=3 invocation. Add --delete-generations=1.. test case.
2015-04-06guix package: Move generation deletion to its own procedure.Ludovic Courtès
* guix/scripts/package.scm (delete-matching-generations): New procedure, with code formerly found... (guix-package)[process-actions]: ... here. Use it. Remove 'current-generation-number'.
2015-03-20guix package: '-s' sorts packages by name, then by version.Ludovic Courtès
Before that it would sort them by name only, so the order in which two packages with the same name but a different version would appear was non-deterministic. Reported by Tomáš Čech <sleep_walker@gnu.org>. * guix/scripts/package.scm (find-packages-by-description)[version<?]: New variable. Change the 2nd argument to 'sort' to use 'string-compare' and resort to 'version<?' when P1 and P2 have the same name.
2015-03-20guix package: '-s' displays different packages that have the same location.Ludovic Courtès
Before that, 'guix package -s foobarbaz' would display only one package when several match but they have the same location (which is common when using 'inherit'.) The original rationale was given at <http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00280.html> but it was arguably misguided because it led to "real" packages being hidden. Reported by Tomáš Čech <sleep_walker@gnu.org>. * guix/scripts/package.scm (find-packages-by-description)[same-location?]: Remove. Remove call to 'delete-duplicates'.