summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* guix package: Factorize generation file name computation.Ludovic Courtès2013-10-30
| | | | | | * guix/scripts/package.scm (generation-file-name): New procedure. Change all occurrences of (format #f "~a-~a-link" profile number) to use it.
* guix package: Specify inputs for each manifest entry.Ludovic Courtès2013-10-30
| | | | | | | | | | | | | | | | * guix/scripts/package.scm (<manifest-entry>): Add 'inputs' field. (manifest=?, lower-input): New procedure. (profile-derivation)[builder]: Add #:log-port argument to 'union-build'. [ensure-valid-input]: Remove. Add each entry's inputs to the input list. (options->installable): Return just the list of entries. [package->manifest-entry]: Set 'inputs' field. [canonicalize-deps]: Rename to... [deduplicate]: ... this. Remove input fiddling. (guix-package)[process-actions]: Use 'manifest=?' to compare the new and old manifests. Pass directly PROF-DRV to 'show-what-to-build'. Pass #:print-build-trace #f to 'set-build-options'.
* guix package: Always use the term "profile", not "user environment".Ludovic Courtès2013-10-30
| | | | | | | * guix/scripts/package.scm (%user-environment-directory): Rename to... (%user-profile-directory): ... this. Update users accordingly. (profile-derivation): Use the term "profile" instead of "user environment", and use "profile" as the derivation name.
* guix package: Introduce <manifest> and <manifest-entry> types.Ludovic Courtès2013-10-30
| | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (<manifest>, <manifest-entry>): New record types. (make-manifest, read-manifest, manifest->sexp, sexp->manifest, read-manifest, write-manifest, remove-manifest-entry, manifest-remove, manifest-installed?): New procedures. (profile-derivation): Take a manifest as the second parameter. Use 'manifest->sexp'. Expect <manifest-entry> objects instead of "tuples". Adjust callers accordingly. (search-path-environment-variables): Changes 'packages' parameter to 'entries'. Rename 'package-in-manifest->package' to 'manifest-entry->package'; expect <manifest-entry> objects. (display-search-paths): Rename 'packages' to 'entries'. (options->installable): Change 'installed' to 'manifest'. Have 'canonicalize-deps' return name/path tuples instead of raw packages. Rename 'package->tuple' to 'package->manifest-entry'. Use <manifest-entry> objects instead of tuples. (guix-package)[process-actions]: Likewise. Rename 'packages' to 'entries'. [process-query]: Use 'manifest-entries' instead of 'manifest-packages'.
* guix package: Better separate option processing.Ludovic Courtès2013-10-30
| | | | | | | | | * guix/scripts/package.scm (find-package): Rename to... (specification->package+output): ... this. Rename 'name' parmameter to 'spec'. Return a package and output name instead of a tuple. (options->installable): New procedure (guix-package)[process-actions]: Use it, and remove corresponding code.
* guix package: Declutter the entry point.Ludovic Courtès2013-10-29
| | | | | | | * guix/scripts/package.scm (newest-available-packages, find-best-packages-by-name, find-package, upgradeable?): New procedures, moved from... (guix-package): ... here.
* guix package: '--search' matches against package names.Ludovic Courtès2013-10-15
| | | | | * guix/scripts/package.scm (find-packages-by-description): Return packages whose name matches RX.
* pull: Compile modules correctly regardless of the compilation order.Ludovic Courtès2013-10-13
| | | | | * guix/scripts/pull.scm (unpack)[builder]: Work around <http://bugs.gnu.org/15602>.
* pull: Simplify the builder.Ludovic Courtès2013-10-13
| | | | | * guix/scripts/pull.scm (unpack)[builder]: Use 'copy-recursively' and 'copy-file' instead of 'file-system-fold'.
* pull: Add '--url' option.Ludovic Courtès2013-10-12
| | | | | | * guix/scripts/pull.scm (%default-options): Add 'tarball-url' pair. (%options, show-help): Add '--url'. (guix-pull): Honor it.
* Merge branch 'core-updates'Ludovic Courtès2013-09-27
|\
| * Merge branch 'master' into core-updatesLudovic Courtès2013-09-26
| |\
| * \ Merge branch 'master' into core-updatesLudovic Courtès2013-09-23
| |\ \
| * | | utils: 'find-files' returns a sorted list.Ludovic Courtès2013-09-15
| | | | | | | | | | | | | | | | | | | | * guix/build/utils.scm (find-files): Sort the result lexicographically. * guix/scripts/pull.scm (unpack): Don't sort the result of 'find-files'.
* | | | guix package: '--delete-generations' deletes generations older than specified.Ludovic Courtès2013-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (matching-generations): Add 'duration-relation' keyword parameter. (guix-package)[process-action](delete-generations): Pass #:duration-relation >. * tests/guix-package.sh: Add test. * doc/guix.texi (Invoking guix package): Clarify the meaning of durations for '--list-durations' and '--delete-durations'.
* | | | guix package: Add '--delete-generations'.Nikita Karetnikov2013-09-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (switch-to-previous-generation): New function. (roll-back): Use the new function instead of 'switch-link'. (show-help): Add '--delete-generations'. (%options): Likewise. (guix-package)[process-actions]: Add 'current-generation-number', 'display-and-delete', and 'delete-generation'. Add support for '--delete-generations', and reindent the code. * tests/guix-package.sh: Test '--delete-generations'. * doc/guix.texi (Invoking guix-package): Document '--delete-generations'.
* | | | guix package: Add 'link-to-empty-profile'.Nikita Karetnikov2013-09-26
| | | | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (link-to-empty-profile): New function. (roll-back): Use it.
* | | | guix package: Exit with 0 when there is nothing to list.Nikita Karetnikov2013-09-26
| |_|/ |/| | | | | | | | | | | * guix/scripts/package.scm (guix-package)[process-query]: Exit with 0 when there are no generations containing packages or no profiles.
* | | guix package: Show which generation is the current one.Nikita Karetnikov2013-09-25
| | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (guix-package)[process-query]: Show that a generation is the current one if the profile points to it. * tests/guix-package.sh: Test it.
* | | guix package: Do not list the zeroth generation.Nikita Karetnikov2013-09-25
| | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (guix-package)[process-query]: Change 'list-generation' to not list the zeroth generation. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Document it, and use the right term when talking about generations.
* | | guix package: Exit with 1 when a generation cannot be listed.Nikita Karetnikov2013-09-25
| |/ |/| | | | | | | | | | | * guix/scripts/package.scm (guix-package)[process-query]: Exit with 1 when a generation does not exist or the profile points to the zeroth generation. * tests/guix-package.sh: Test the former case.
* | guix package: Show most recently installed packages last.Ludovic Courtès2013-09-23
| | | | | | | | | | | | | | | | | | Suggested by Andreas Enge <andreas@enge.fr>. * guix/scripts/package.scm (guix-package)[list-generations, list-installed]: Reverse the result of 'manifest-packages'. * doc/guix.texi (Invoking guix package): Document the order of packages for '--list-generations' and '--list-installed'.
* | guix package: Sort the list of generation numbers in '--list-generations'.Ludovic Courtès2013-09-21
| | | | | | | | * guix/scripts/package.scm (generation-numbers): Sort the result.
* | guix package: Internationalize "Generation" string.Ludovic Courtès2013-09-21
| | | | | | | | | | * guix/scripts/package.scm (guix-package): Internationalize generation listing.
* | pull: Adjust to 'derivation' API change.Ludovic Courtès2013-09-21
| | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/15428>. Reported by Cyrill Schenkel <cyrill.schenkel@gmail.com>. * guix/scripts/pull.scm (guix-pull): 'unpack' returns a single value.
* | guix package: Add '--list-generations'.Nikita Karetnikov2013-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/package.scm: Import (srfi srfi-19). (generation-time, matching-generations): New functions. (show-help): Add '--list-generations'. (%options): Likewise. (guix-package)[process-query]: Add support for '--list-generations'. * guix/ui.scm: Import (srfi srfi-19) and (ice-9 regex). (string->generations, string->duration): New functions. * tests/guix-package.sh: Test '--list-generations'. * tests/ui.scm: Import (srfi srfi-19). Test 'string->generations' and 'string->duration'. * doc/guix.texi (Invoking guix-package): Document '--list-generations'.
* | derivations: 'derivation' and related procedures return a single value.Ludovic Courtès2013-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/derivations.scm (derivation->output-path, derivation->output-paths): New procedures. (derivation-path->output-path): Use 'derivation->output-path'. (derivation-path->output-paths): Use 'derivation->output-paths'. (derivation): Accept 'derivation?' objects as inputs. Return a single value. (build-derivations): New procedure. (compiled-modules): Use 'derivation->output-paths'. (build-expression->derivation)[source-path]: Add case for when the input matches 'derivation?'. [prologue]: Accept 'derivation?' objects in INPUTS. [mod-dir, go-dir]: Use 'derivation->output-path'. * guix/download.scm (url-fetch): Adjust to the single-value return. * guix/packages.scm (package-output): Use 'derivation->output-path'. * guix/scripts/build.scm (guix-build): When the argument is 'derivation-path?', pass it through 'read-derivation'. Use 'derivation-file-name' to print out the .drv file names, and to register them. Use 'derivation->output-path' instead of 'derivation-path->output-path'. * guix/scripts/package.scm (roll-back): Adjust to the single-value return. (guix-package): Use 'derivation->output-path'. * guix/ui.scm (show-what-to-build): Adjust to deal with 'derivation?' objects instead of .drv file names. * gnu/system/grub.scm (grub-configuration-file): Use 'derivation->output-path' instead of 'derivation-path->output-path'. * gnu/system/vm.scm (qemu-image, system-qemu-image): Likewise. * tests/builders.scm, tests/derivations.scm, tests/packages.scm, tests/store.scm, tests/union.scm: Adjust to the new calling convention. * doc/guix.texi (Defining Packages, The Store, Derivations): Adjust accordingly.
* | substitute-binary: Add '--help'.Ludovic Courtès2013-09-13
| | | | | | | | | | | | | | Reported by Nikita Karetnikov <nikita@karetnikov.org>. * guix/scripts/substitute-binary.scm (show-help): New procedure. (guix-substitute-binary): Add '--help'.
* | guix package: Rename generation-related procedures.Nikita Karetnikov2013-09-13
|/ | | | | | | * guix/scripts/package.scm (profile-numbers): Rename to 'generation-numbers'. (previous-profile-number): Rename to 'previous-generation-number'. (profile-number): Rename to 'generation-number'. (roll-back): Rename 'previous-profile' to 'previous-generation'.
* pull: Compile files in the lexicographic order.Ludovic Courtès2013-09-03
| | | | | * guix/scripts/pull.scm (unpack): Print the name of the file being compiled. Sort the names of files to compile.
* substitute-binary: Show the Nar size, when available.Ludovic Courtès2013-09-02
| | | | | | * guix/scripts/substitute-binary.scm (guix-substitute-binary)["--substitute"]: Show the Nar size, when available. * guix/ui.scm (show-what-to-build): Add 'TODO'.
* utils: Add `guile-version>?', and use it.Ludovic Courtès2013-08-23
| | | | | | | | | | | | | | This fixes Guile version comparisons when (version) has a vendor-specific suffix. Reported by Andreas Enge <andreas@enge.fr>. * guix/utils.scm (guile-version>?): New procedure. * tests/utils.scm ("guile-version>? 1.8", "guile-version>? 10.5"): New tests. * guix/scripts/substitute-binary.scm (fetch, progress-report-port): Use `guile-version>?' instead of `version>?'. * guix/http-client.scm (when-guile<=2.0.5, http-fetch): Likewise.
* substitute-binary: Try hard to avoid port buffering.Ludovic Courtès2013-08-22
| | | | | | | | | * guix/scripts/substitute-binary.scm (fetch): In the `file' case, open with the `b' flag, so that the coding cookie reading thing doesn't lead to buffering some of the data (on 2.0.5). * tests/utils.scm ("filtered-port, file"): Open with `r0b'. Fixes a test failure with Guile 2.0.5 whereby the first byte of FILE would be missing from DECOMPRESSED.
* substitute-binary: Don't pretend to report download progress on Guile 2.0.5.Ludovic Courtès2013-08-21
| | | | | * guix/scripts/substitute-binary.scm (progress-report-port): On Guile 2.0.5, return PORT directly and emit a warning.
* guix package: Allow separate install of several outputs of the same package.Ludovic Courtès2013-07-15
| | | | | | * guix/scripts/package.scm (guix-package)[process-actions](same-package?): New procedure. Use it instead of `alist-delete' when filtering out duplicate packages from the profile.
* Rename (guix web) to (guix http-client).Ludovic Courtès2013-07-14
| | | | | | | * guix/web.scm: Rename to... * guix/http-client.scm: ... this. * guix/gnu-maintenance.scm, guix/scripts/substitute-binary.scm, Makefile.am, po/POTFILES.in: Update accordingly.
* guix package: Fix handling of `-e'.Ludovic Courtès2013-07-12
| | | | | | | | | | | | | This fixes a bug whereby a command like guix package -e '(@@ (gnu packages base) gnu-make-boot0)' would only succeed when the outputs of that package are available, and otherwise fail with "/nix/store/... is not valid". * guix/scripts/package.scm (guix-package)[process-action](package->tuple): Leave P as is in the result. Move `package->tuple' call from INSTALL* to INSTALL.
* guix package: Reuse FTP connections for subsequent `latest-release' calls.Ludovic Courtès2013-07-12
| | | | | | | | * guix/gnu-maintenance.scm (latest-release): Add `ftp-close' and `ftp-open' keyword parameters. * guix/scripts/package.scm (ftp-open*): New variable. (check-package-freshness): Call `latest-release' with `ftp-open*' and a no-op procedure.
* substitute-binary: Directly replace the global `regexp-exec'.Ludovic Courtès2013-07-11
| | | | | | | * guix/scripts/substitute-binary.scm (%regexp-exec-mutex, string->uri): Remove. (regexp-exec): Replace this global binding by a thread-safety wrapper. (fields->alist): Remove `with-mutex', and directly alias `recutils->alist'.
* substitute-binary: Increase the default timeout.Ludovic Courtès2013-07-11
| | | | * guix/scripts/substitute-binary.scm (%fetch-timeout): Set to 5 seconds.
* guix refresh: Keep only the newest versions of packages as upgrade candidates.Ludovic Courtès2013-07-11
| | | | | * guix/scripts/refresh.scm (guix-refresh)[keep-newest]: New procedure. Use it to keep only once copy of each package.
* records: Add `recutils->alist' for public consumption.Ludovic Courtès2013-07-10
| | | | | | | * guix/records.scm (%recutils-field-rx): New variable. (recutils->alist): New procedure, formerly known as `fields->alist'. * guix/scripts/substitute-binary.scm (fields->alist): Use it. * tests/records.scm ("recutils->alist"): New test.
* Use `port-sha256' and `open-sha256-port'.Ludovic Courtès2013-07-03
| | | | | | | | * guix/derivations.scm (derivation-hash): Add comment as to why we keep the plain `sha256' call. * guix/scripts/download.scm (guix-download): Use `port-sha256' instead of (compose sha256 get-bytevector-all). * guix/scripts/refresh.scm (update-package): Likewise.
* Move `sha256' to (guix hash).Ludovic Courtès2013-07-01
| | | | | | | | | * guix/utils.scm (sha256): Move to... * guix/hash.scm: ... here. New file. * Makefile.am (MODULES): Add it. * guix/derivations.scm, guix/scripts/download.scm, guix/scripts/hash.scm, guix/scripts/refresh.scm, tests/base32.scm, tests/derivations.scm, tests/store.scm: Use (guix hash).
* substitute-binary: Avoid dangling connections to the server.Ludovic Courtès2013-06-29
| | | | | | | | | * guix/web.scm (open-socket-for-uri): New procedure. (http-fetch): Add `port' keyword parameter; use it. * guix/scripts/substitute-binary.scm (%random-state): New variable. (with-timeout): Wait a little before retrying. (fetch): Use `open-socket-for-uri', and keep a copy of the socket in variable `port'. Close PORT upon timeout.
* package: Fix i18n of the number of packages message.Ludovic Courtès2013-06-20
| | | | | * guix/scripts/package.scm (guix-package)[process-actions]: Use `N_' for i18n of the number of packages message.
* substitute-binary: Report progress while downloading.Ludovic Courtès2013-06-20
| | | | | | | * guix/scripts/substitute-binary.scm (decompressed-port): Improve docstring. (progress-report-port): New procedure. (guix-substitute-binary)["--substitute"]: Use it to report progress. * guix/build/download.scm: Export `progress-proc' and `uri-abbreviation'.
* package: Display the number of installed packages upon completion.Ludovic Courtès2013-06-19
| | | | | * guix/scripts/package.scm (guix-package)[process-actions]: Display the number of packages in the profile upon completion.
* substitute-binary: Provide feedback when the server is unresponsive.Ludovic Courtès2013-06-18
| | | | | | | | * guix/scripts/substitute-binary.scm (%fetch-timeout): New variable. (with-timeout): New macro. (fetch): Add `timeout?' keyword parameter. Enclose `http-fetch' call in `with-timeout'. (guix-substitute-binary): Call `fetch' with #:timeout? #f.
* guix gc: Add `--requisites'.Ludovic Courtès2013-06-13
| | | | | | | * guix/scripts/gc.scm (show-help, %options): Add `--requisites'. (guix-gc): Handle it. * doc/guix.texi (Invoking guix gc): Document `--requisites'. * NEWS: Update.