summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* substitute: Honor all the specified server URLs.Ludovic Courtès2015-10-28
| | | | | | | | | | | | | | * guix/scripts/substitute.scm (lookup-narinfos/diverse): New procedure. (lookup-narinfo): Use it. (process-query): Change #:cache-url to #:cache-urls. [valid?]: Remove 'narinfo?' check, which is no longer necessary. Use 'lookup-narinfos/diverse' instead of 'lookup-narinfos'. (process-substitution): Change #:cache-url to #:cache-urls. (%cache-url): Rename to... (%cache-urls): ... this. Turn into a list. (guix-substitute): Remove 'getaddrinfo' test with early exit. Adjust calls to 'process-query' and 'process-substitution'. * tests/substitute.scm: Change '%cache-url' to '%cache-urls'.
* substitute: 'lookup-narinfos' returns exactly a list of narinfos.Ludovic Courtès2015-10-28
| | | | | | | | * guix/scripts/substitute.scm (lookup-narinfos): Filter out #f values from CACHED, such that the end result is exactly a list of narinfos, not interspersed with #f. * guix/scripts/challenge.scm (discrepancies): Assume REMOTE is a list of narinfos.
* substitute: 'http-multiple-get' follows 'fold' style.Ludovic Courtès2015-10-28
| | | | | | | * guix/scripts/substitute.scm (http-multiple-get): Add 'seed' parameter. Call PROC in 'fold' style. (fetch-narinfos)[handle-narinfo-response]: Adjust accordingly. Update 'http-multiple-get' call accordingly.
* refresh: Add '--list-updaters' option.Alex Kost2015-10-27
| | | | | | * guix/scripts/refresh.scm (list-updaters-and-exit): New procedure. (%options, show-help): Add '--list-updaters' option. * doc/guix.texi (Invoking guix refresh): Document it.
* 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.
* utils: Add 'switch-symlinks', moved from (guix ui).Ludovic Courtès2015-10-27
| | | | | | * guix/ui.scm (switch-symlinks): Move to... * guix/utils.scm: ... here. New procedure. * guix/scripts/pull.scm: Use it.
* guix system: Add the 'list-generations' command.Ludovic Courtès2015-10-27
| | | | | | | | | | | | * guix/scripts/system.scm (display-system-generation, list-generations): New procedures. (process-action): Clarify docstring. (process-command): New procedure. (guix-system)[parse-sub-command]: Add 'list-generations' Call 'process-command' instead of 'process-action'. * doc/guix.texi (Using the Configuration System): Mention generations, rollback, and 'list-generations'. (Invoking guix system): Document 'list-generations'.
* guix system: Factorize boot parameter parsing.Ludovic Courtès2015-10-27
| | | | | | * guix/scripts/system.scm (<boot-parameters>): New record type. (read-boot-parameters): New procedure. (previous-grub-entries)[system->grub-entry]: Use it.
* 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.
* guix system: Extract action processing.Ludovic Courtès2015-10-27
| | | | | | * guix/scripts/system.scm (process-action): New procedure. Extracted from... (guix-system): ... here. Use it.
* ui: Add 'matching-generations'.Ludovic Courtès2015-10-27
| | | | | * guix/scripts/package.scm (matching-generations): Move to... * guix/ui.scm (matching-generations): ... here.
* scripts: environment: Add --container option.David Thompson2015-10-25
| | | | | | | | | | | | | | | * guix/scripts/system.scm (specification->file-system-mapping): Move from here... * guix/ui.scm (specification->file-system-mapping): ... to here. * guix/scripts/enviroment.scm (show-help): Show help for new options. (%options): Add --container --network, --expose, and --share options. (%network-configuration-files): New variable. (launch-environment, launch-environment/container, requisites*, inputs->requisites): New procedures. (guix-environment): Spawn new process in a container when requested. * doc/guix.texi (Invoking guix environment): Document it. * tests/guix-environment-container.sh: New file. * Makefile.am (SH_TESTS): Add it.
* import: hackage: Fix grammar.Paul van der Walt2015-10-23
| | | | | | Minor clarification regarding the test-dependencies command line option. * guix/scripts/import/hackage.scm (show-help): Minor grammatical fix.
* import: cran: Add updater.Ludovic Courtès2015-10-21
| | | | | | | | | * guix/import/cran.scm (downloads->url, nodes->text): New procedures. (cran-sxml->sexp): Use them. Remove equivalent local code. (latest-release, cran-package?): New procedures. (%cran-updater): New variable. * guix/scripts/refresh.scm (%updaters): Add %CRAN-UPDATER. * doc/guix.texi (Invoking guix refresh): Mention CRAN.
* refresh: Remove exception catch-all.Ludovic Courtès2015-10-21
| | | | * guix/scripts/refresh.scm (update-package): Remove 'catch #t'.
* refresh: Add '--type' option.Ludovic Courtès2015-10-21
| | | | | | | | * guix/scripts/refresh.scm (%options, show-help): Add --type. (lookup-updater): New procedure. (update-package): Add 'updaters' parameter and honor it. (guix-refresh)[options->updaters]: New procedure. Use it, and honor --type.
* import: elpa: Add updater.Ludovic Courtès2015-10-21
| | | | | | | * guix/import/elpa.scm (latest-release, package-from-gnu.org?): New procedures. (%elpa-updater): New variable. * guix/scripts/refresh.scm (%updaters): Add %ELPA-UPDATER.
* gnu-maintenance: Generalize, leading to (guix upstream).Ludovic Courtès2015-10-21
| | | | | | | | | | | | | | | | | | | | * guix/gnu-maintenance.scm (<gnu-release>): Remove. (coalesce-releases): Move to upstream.scm. Rename to 'coalesce-sources'; adjust callers. (releases, latest-release): Return <upstream-source> objects instead of <gnu-release> objects. (latest-release*, non-emacs-gnu-package?): New procedures. (gnu-release-archive-types): Remove. (%gnu-updater): New variable. (package-update-path, download-tarball, package-update, update-package-source): Move to... * guix/upstream.scm: ... here. New file. * Makefile.am (MODULES): Add it. * po/guix/POTFILES.in: Replace gnu-maintenance.scm with upstream.scm. * guix/scripts/refresh.scm (%updaters): New variable. (update-package): Adjust to new 'package-update' interface. (guix-refresh): Adjust to new 'package-update-path'. Remove 'false-if-exception' around it.
* Add 'guix challenge'.Ludovic Courtès2015-10-20
| | | | | | | | | | | | * guix/scripts/challenge.scm, tests/challenge.scm: New files. * Makefile.am (MODULES): Add the former. (SCM_TESTS): Add the latter. * doc.am (SUBCOMMANDS): Add 'challenge'. * doc/guix.texi (Substitutes): Add xref to 'guix challenge'. (Invoking guix challenge): New node. * doc/contributing.texi (Submitting Patches): Add note about using 'guix challenge'. * po/guix/POTFILES.in: Add guix/scripts/challenge.scm.
* substitute: Expose narinfo access.Ludovic Courtès2015-10-19
| | | | | | * guix/scripts/substitute.scm: Export <narinfo> accessors. (narinfo-hash->sha256): New procedure. (cache-narinfo!): Ignore EACCES exceptions.
* guix archive: Add '--extract'.Ludovic Courtès2015-10-19
| | | | | | | * guix/scripts/archive.scm (show-help, %options): Add --extract. (guix-archive): Honor it. * tests/guix-archive.sh: Test it. * doc/guix.texi (Invoking guix archive): Document it.
* guix system: Add 'dmd-graph' command.Ludovic Courtès2015-10-14
| | | | | | | | | | | | * guix/scripts/system.scm (dmd-service-node-label, dmd-service-node-type, export-dmd-graph): New procedures. (show-help): Add 'dmd-graph'. (guix-system)[parse-sub-command]: Likewise. Honor it. * doc/guix.texi (Invoking guix system): Document it. (dmd Services): Add an illustration and explanation. * doc/images/dmd-graph.dot: New file. * doc.am (DOT_FILES): Add it.
* guix system: Add 'extension-graph' command.Ludovic Courtès2015-10-14
| | | | | | | | | | * guix/scripts/system.scm (service-node-label, service-node-type, export-extension-graph): New procedures. (guix-system)[parse-sub-command]: Add 'extension-graph'. Honor it. (show-help): Add 'extension-graph'. * doc/guix.texi (Invoking guix system): Document it. (Service Composition): Add cross-reference.
* graph: 'export-graph' takes a #:reverse-edges? parameter.Ludovic Courtès2015-10-14
| | | | | * guix/scripts/graph.scm (export-graph): Add #:reverse-edges? parameter and honor it.
* guix system: Add '--derivation'.Ludovic Courtès2015-10-10
| | | | | | | | | * guix/scripts/system.scm (perform-action): Add #:derivations-only? parameter and honor it. (show-help, %options): Add '--derivation'. (guix-system): Pass #:derivations-only? to 'perform-action'. * tests/guix-system.sh: Test it. * doc/guix.texi (Invoking guix system): Document it.
* scripts: environment: Use system* instead of system.David Thompson2015-10-09
| | | | | | | | | | | | | | | | This allows for direct program invokation without needing a shell to act as a command interpreter. * guix/scripts/environment.scm (%default-shell): New variable. (show-help): Adjust description. Remove '--exec' reference. (%default-options): Use '%default-shell'. (%options): Adjust '--exec' to run command via the default shell. (parse-args): New procedure. (guix-environment): Use 'parse-args'. Use 'system*' instead of 'system'. * tests/guix-environment.sh: Add test for '--' command invokation. * doc/guix.texi ("Invoking guix environment"): Use new syntax. Remove '--exec' documentation.
* lint: Export 'run-checkers'.Alex Kost2015-10-09
| | | | | * guix/scripts/lint.scm (run-checkers): Export. Make 'checkers' argument optional.
* publish: Fix file descriptor leak.Ludovic Courtès2015-10-06
| | | | | | | | A client closing the connection while reading from a /nar URL would leave an open file descriptor in the server. This patch fixes it. * guix/scripts/publish.scm (swallow-EPIPE): New macro. (http-write): Use it around 'write-file' call.
* guix gc: Add '--list-failures' and '--clear-failures'.Ludovic Courtès2015-09-28
| | | | | | | | | | Suggested by Mark H Weaver <mhw@netris.org>. * guix/scripts/gc.scm (show-help, %options): Add --list-failures and --clear-failures. (guix-gc): Honor them. * doc/guix.texi (Invoking guix gc): Document them. (Invoking guix-daemon): Mention them.
* lint: Fix 'check-texinfo-markup'.Mathieu Lirzin2015-09-28
| | | | | | | Fixes a regression introduced in 5d8d8f3. * guix/scripts/lint.scm (check-description-style): When no exception is thrown in 'check-texinfo-markup', return the rendered description.
* lint: Improve 'check-texinfo-markup'.Mathieu Lirzin2015-09-26
| | | | | | | * guix/scripts/lint.scm (check-description-style): Set 'field' parameter when emitting a warning in 'check-texinfo-markup'. Catch any error that may occur in during the 'texi->plain-text' conversion. This is a followup to commit 2748ee3.
* offload: Use gzip instead of xz for compression on the master.Ludovic Courtès2015-09-25
| | | | * guix/scripts/offload.scm (send-files): Use gzip --fast instead of xz.
* lint: Accept '`' character.Mathieu Lirzin2015-09-24
| | | | | * guix/scripts/lint.scm (properly-starts-sentence?): Match Texinfo highlighting commands as a sentence start.
* lint: Check non-translated package descriptions.Mathieu Lirzin2015-09-24
| | | | | | * guix/ui.scm (texi->plain-text): Export. * guix/scripts/lint.scm (check-description-style): Use it instead of 'package-description-string'.
* scripts: Add 'build-package'.Alex Kost2015-09-22
| | | | | | | | * guix/scripts/system.scm (maybe-build): Move to ... * guix/scripts.scm: ...here. (build-package): New procedure. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* lint: Report lonely parentheses.Ludovic Courtès2015-09-18
| | | | | | | * guix/scripts/lint.scm (%hanging-paren-rx): New variable. (report-lone-parentheses): New procedure. (%formatting-reporters): Use it. * tests/lint.scm ("formatting: lonely parentheses"): New test.
* ui: Add 'show-derivation-outputs'.Alex Kost2015-09-18
| | | | | * guix/scripts/build.scm (guix-build): Extract code from here and move to... * guix/ui.scm (show-derivation-outputs): ... here. New procedure.
* 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.
* substitute: Improve readability of download progress report.Steve Sprang2015-09-16
| | | | | | | | | | | | * guix/build/download.scm (string-pad-middle, store-url-abbreviation, store-path-abbreviation): New procedures. (progress-proc): Add #:abbreviation parameter and use it. Generate a better indeterminate progress string. * guix/scripts/substitute.scm (assert-valid-narinfo): Add newlines to output. (process-substitution): Use byte-count->string and store-path-abbreviation. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* lint: Add 'check-texinfo-markup' checker.Mathieu Lirzin2015-09-15
| | | | | | * guix/script/lint.scm (check-description-style): Check for invalid Texinfo markup. * tests/lint.scm: Test it.
* guix: lint: Check for meaningful origin file names.Eric Bavier2015-09-14
| | | | | | | | | * guix/scripts/lint.scm (check-source-file-name): New procedure. (%checkers): Add 'source-file-name' checker. * tests/lint.scm ("source-file-name", "source-file-name: v prefix") ("source-file-name: valid", "source-file-name: bad checkout") ("source-file-name: good checkout"): New tests. * doc/guix.texi (Invoking guix lint): Mention file name check.
* guix: packages: Add origin-actual-file-name.Eric Bavier2015-09-14
| | | | | | | | * guix/scripts/graph.scm (uri->file-name, node-full-name): Move origin file name logic to... * guix/packages.scm (origin-actual-file-name): ...here. * tests/packages.scm ("origin-actual-file-name") ("origin-actual-file-name, file-name"): New tests.
* guix system: Gracefully handle incomplete commands.Ludovic Courtès2015-09-15
| | | | | | | | Fixes <http://bugs.gnu.org/21451>. Reported by Steve Sprang <steve.sprang@gmail.com>. * guix/scripts/system.scm (guix-system)[option-arguments]: Error out when ACTION is #f.
* guix build: '--log-file' can return URLs.Ludovic Courtès2015-09-10
| | | | | | | * guix/scripts/build.scm (%default-log-urls): New variable. (log-url): New procedure. (guix-build): Use it. * doc/guix.texi (Invoking guix build): Document it.
* pull: Update to the new cgit snapshot URL.Ludovic Courtès2015-09-10
| | | | * guix/scripts/pull.scm (%snapshot-url): Update to the new URL.
* lint: Add 'license' checker.Ludovic Courtès2015-09-06
| | | | | | * guix/scripts/lint.scm (check-license): New procedure. (%checkers): Add 'license' checker. * tests/lint.scm ("license: invalid license"): New test.
* publish: Gracefully handle the lack of a deriver.Ludovic Courtès2015-09-04
| | | | | | | | * guix/scripts/publish.scm (narinfo-string): Catch 'system-error' around 'load-derivation' call; return BASE-INFO upon ENOENT. This allows us to return the narinfo even if DERIVER is missing. Before that, the exception would be uncaught, leading to 500 Internal Error on the client side.
* graph: Add '--expression'.Ludovic Courtès2015-09-02
| | | | | | | | * guix/scripts/graph.scm (%options, show-help): Add '--expression'. (guix-graph): Call 'read/eval-package-expression' for 'expression' pairs in OPTS. * tests/guix-graph.sh: Add tests. * doc/guix.texi (Invoking guix graph): Document it.
* import: Add 'cran' importer.Ricardo Wurmus2015-08-31
| | | | | | | | | | | | * guix/import/cran.scm: New file. * guix/scripts/import.scm: Add "cran" to 'importers'. * guix/scripts/import/cran.scm: New file. * tests/cran.scm: New file. * Makefile.am (MODULES): Add 'guix/import/cran.scm' and 'guix/scripts/import/cran.scm'. (SCM_TESTS): Add 'tests/cran.scm'. * doc/guix.texi (Invoking guix import): Document it. * po/guix/POTFILES.in: Add 'guix/scripts/import/cran.scm'.