summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
Commit message (Collapse)AuthorAge
* profiles: Remove dependency on 'glibc-utf8-locales' for tests.Ludovic Courtès2016-12-17
| | | | | | | | | | | | | | | | | | Commit 1af0860e8be81c01ad405c1226d6bc4516e62863 added a mandatory dependency on 'glibc-utf8-locales', which entails long rebuilds for tests. * guix/profiles.scm (profile-derivation): Add #:locales? parameter. Add 'set-utf8-locale' variable. Use it when LOCALES? is true. (link-to-empty-profile): Pass #:locales? #f. * guix/scripts/environment.scm (inputs->profile-derivation): Pass #:locales?. * guix/scripts/package.scm (build-and-use-profile): Likewise. * tests/packages.scm ("--search-paths with pattern"): Pass #:locales? #f. * tests/profiles.scm ("profile-derivation") ("profile-derivation, inputs", "profile-manifest, search-paths") ("etc/profile", "etc/profile when etc/ already exists"): ("etc/profile when etc/ is a symlink"): Likewise.
* profiles: Extract a procedure for getting relative generation numbers.Chris Marusich2016-11-06
| | | | | | | * guix/profiles.scm (relative-generation-spec->number): New procedure. * guix/scripts/package.scm (switch-generation-action): Use it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix package: Display generation diffs.Roel Janssen2016-10-26
| | | | | | | * guix/ui.scm (display-profile-content-diff): New variable. * guix/scripts/package.scm (process-query): Use display-profile-content-diff. In collaboration with Benz Schenk.
* 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.
* guix package: Build up the transaction incrementally.Ludovic Courtès2016-09-06
| | | | | | | | | | | | | | * guix/scripts/package.scm (upgraded-manifest-entry): Rename to... (transaction-upgrade-entry): ... this. Add 'transaction' parameter and return a transaction. (options->installable): Likewise. [to-upgrade]: Rename to... [upgraded]: ... this, and change to be a transaction. Return a transaction. (options->removable): Likewise. (process-actions): Adjust accordingly. * tests/packages.scm ("transaction-upgrade-entry, zero upgrades") ("transaction-upgrade-entry, one upgrade"): New tests.
* guix package: Clarify upgrade code.Ludovic Courtès2016-09-06
| | | | | | | * guix/scripts/package.scm (upgradeable?): Rename to... (upgraded-manifest-entry): ... this. Change to take a <manifest-entry> and to return a <manifest-entry>. (options->installable)[to-upgrade]: Adjust accordingly.
* guix scripts: Disable grafting on dry runs.Roel Janssen2016-08-28
| | | | | | * guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/environment.scm, guix/scripts/system.scm, guix/scripts/package.scm: Disable grafting when a dry-run parameter is given.
* guix package: Suggest prefix search path settings.Ludovic Courtès2016-07-28
| | | | | * guix/scripts/package.scm (build-and-use-profile): Pass #:kind 'prefix to 'display-search-paths'.
* guix package: Inherit the transformed version number.Ludovic Courtès2016-05-27
| | | | | | | | | | | 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.
* emacs: Use 'build-and-use-profile' from (guix scripts package).Alex Kost2016-04-04
| | | | | * guix/scripts/package.scm: Export 'build-and-use-profile'. * emacs/guix-main.scm (process-package-actions): Use it.
* guix build: Move '--no-grafts' to the common build options.Ludovic Courtès2016-03-02
| | | | | | | | | | | | | | | | * 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.
* 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.
* guix package: Support package transformation options.Ludovic Courtès2016-02-01
| | | | | | | | | | * 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'.
* guix package: Allow multiple '--search' flags.Ludovic Courtès2016-01-05
| | | | | | | | | | | * 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.
* guix package: Fix typo in comment.Leo Famulari2015-12-25
| | | | * guix/scripts/package.scm: Fix typo.
* guix package: Refactor 'options->installable'.Ludovic Courtès2015-12-01
| | | | | | | | * 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.
* guix package: Move 'process-actions' out of sight.Ludovic Courtès2015-12-01
| | | | | | * guix/scripts/package.scm (process-actions): New procedure, moved from... (guix-package): ... here. Adjust accordingly.
* guix package: Formalize the list of actions.Ludovic Courtès2015-12-01
| | | | | | | | * 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.
* guix package: Move 'build-and-use-profile' out of sight.Ludovic Courtès2015-12-01
| | | | | | * guix/scripts/package.scm (build-and-use-profile): New procedure. Adapted and moved from... (guix-package)[process-actions]: ... here. Adjust call sites.
* guix package: Move a couple of procedures out of sight.Ludovic Courtès2015-12-01
| | | | | | * guix/scripts/package.scm (ensure-default-profile, process-query): New procedures, moved from... (guix-package): ... here.
* guix package: Remove unnecessary use of (%store).Ludovic Courtès2015-12-01
| | | | | * guix/scripts/package.scm (delete-matching-generations): Use STORE instead of (%store).
* guix package: Reduce startup time by ~50%.Ludovic Courtès2015-11-24
| | | | | | | | | | | | | | | | | | | 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.
* guix package: '--search-paths' can report combined search paths.Ludovic Courtès2015-11-11
| | | | | | | | | | | | | 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.
* ui: Add 'make-regexp*'.Ludovic Courtès2015-10-28
| | | | | | | | | 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.
* profiles: Add generation manipulation procedures.Ludovic Courtès2015-10-27
| | | | | | | | | | | | | | | * 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.
* ui: Add procedures to display a profile generation.Ludovic Courtès2015-10-27
| | | | | | | | * 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.
* utils: Add 'readlink*'.Ludovic Courtès2015-10-27
| | | | | * guix/scripts/package.scm (readlink*): Move to... * guix/utils.scm (readlink*): ... here. New procedure.
* ui: Add 'matching-generations'.Ludovic Courtès2015-10-27
| | | | | * guix/scripts/package.scm (matching-generations): Move to... * guix/ui.scm (matching-generations): ... here.
* Add (guix scripts).Alex Kost2015-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* scripts: package: Add --install-from-file option.David Thompson2015-08-19
| | | | | | | | | | * 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.
* ui: Add 'leave-on-EPIPE'.Ludovic Courtès2015-07-15
| | | | | * guix/scripts/package.scm (leave-on-EPIPE): Move to... * guix/ui.scm (leave-on-EPIPE): ... here.
* 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.
* guix: Clean up --help messages.Alex Kost2015-06-08
| | | | | | | | | | * 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.
* guix package: Fix typo in --help message.Alex Kost2015-06-06
| | | | * guix/scripts/package.scm (show-help): Align '--show' option properly.
* emacs: Report about "search paths" after operation.Alex Kost2015-05-29
| | | | | * guix/scripts/package.scm: Export 'display-search-paths'. * emacs/guix-main.scm (process-package-actions): Use it.
* guix package: --manifest DTRT when combined with --dry-run.Ludovic Courtès2015-05-25
| | | | | | | * 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.
* guix package: Adjust --help message.Ludovic Courtès2015-05-21
| | | | | * guix/scripts/package.scm (show-help): Add KIND parameter for --search-paths as a followup to dbc31ab.
* package: Add --manifest option.David Thompson2015-05-20
| | | | | | | | * 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.
* guix package: Add optional argument to --search-paths.Ludovic Courtès2015-05-20
| | | | | | | | | | | | * 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.
* guix package: --search-paths mentions $PATH.Ludovic Courtès2015-05-20
| | | | | * guix/scripts/package.scm (search-path-environment-variables): Add $PATH to SEARCH-PATHS.
* search-paths: 'evaluate-search-paths' can be passed a list of directories.Ludovic Courtès2015-05-05
| | | | | | | * 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.
* search-paths: 'evaluate-search-paths' now returns spec/value pairs.Ludovic Courtès2015-05-04
| | | | | | | * 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'.
* search-paths: Add 'environment-variable-definition'.Ludovic Courtès2015-05-04
| | | | | * guix/search-paths.scm (environment-variable-definition): New variable. * guix/scripts/package.scm (search-path-environment-variables): Use it.
* search-paths: Add 'evaluate-search-paths', from (guix scripts package).Ludovic Courtès2015-05-04
| | | | | | | | | * 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.
* Move search path specifications to (guix search-paths).Ludovic Courtès2015-05-04
| | | | | | | | | | | | | * 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.
* guix package: Introduce 'evaluate-search-paths'.Ludovic Courtès2015-05-04
| | | | | | * 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.
* guix package: Move profile cleaning out of 'search-path-environment-variables'.Ludovic Courtès2015-05-04
| | | | | | | | * 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.
* profiles: Store search paths in manifests.Ludovic Courtès2015-05-02
| | | | | | | | | | | | | | | | | | | 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.
* guix package: Fix 'readlink*' implementation.Ludovic Courtès2015-04-19
| | | | | * guix/scripts/package.scm (readlink*): Fix to handle symlinks with relative targets. Taken from ld-wrapper2.in.
* guix package: -A and -s take supported systems into account.Ludovic Courtès2015-04-19
| | | | | | | | | | * 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.