summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* 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'.
* guix graph: Export node types and <node-type> accessors.Alex Kost2015-08-30
| | | | | | * guix/scripts/graph.scm (%node-types, node-type, node-type?, node-type-identifier, node-type-label, node-type-edges, node-type-convert, node-type-name, node-type-description): Export.
* guix lint: Export checkers and <lint-checker> accessors.Alex Kost2015-08-30
| | | | | | * guix/scripts/lint.scm (%checkers, lint-checker, lint-checker?, lint-checker-name, lint-checker-description, lint-checker-check): Export.
* refresh: Add missing newline in warning message.Ludovic Courtès2015-08-29
| | | | | | | Reported by karhunkynsi on #guix. * guix/scripts/refresh.scm (update-package): Add missing newline in string literal passed to 'warning'.
* import: Add Ruby gem importer.David Thompson2015-08-27
| | | | | | | | * gnu/scripts/import.scm (importers): Add "gem". * gnu/import/gem.scm: New file. * gnu/scripts/import/gem.scm: New file. * Makefile.am (MODULES): Add them. * guix.texi ("invoking guix import"): Document it.
* Add 'guix graph'.Ludovic Courtès2015-08-27
| | | | | | | | | | | | | | | | | * guix/scripts/graph.scm, tests/graph.scm, tests/guix-graph.sh, doc/images/coreutils-bag-graph.dot, doc/images/coreutils-graph.dot: New files. * Makefile.am (MODULES): Add guix/scripts/graph.scm. (SH_TESTS): Add tests/guix-graph.sh. (SCM_TESTS): Add tests/graph.scm. * doc.am (DOT_FILES, DOT_VECTOR_GRAPHICS): New variables. (EXTRA_DIST): Use them. (dist_infoimage_DATA): Use $(DOT_FILES). (pdf-local, info-local, ps-local): Likewise. * doc/guix.texi (Packages with Multiple Outputs): Add cross-reference to 'guix graph'. (Invoking guix gc): Likewise. (Invoking guix graph): New section.
* 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.
* size: Get the item's size from the daemon rather than compute it.Ludovic Courtès2015-08-19
| | | | | | | | | | This removes all I/O, which obviously makes things faster. * guix/scripts/size.scm (file-size, store-item-exists?): Remove. (query-path-info*): New procedure. (file-size*): Rename to... (file-size): ... this; adjust caller. Use 'query-path-info*' instead of 'file-size'.
* lint: Add 'formatting' checker.Ludovic Courtès2015-08-19
| | | | | | | | | | | * guix/scripts/lint.scm (report-tabulations, report-trailing-white-space, report-long-line, report-formatting-issues, check-formatting): New procedures. (%formatting-reporters): New variable. (%checkers): Add 'formatting' checker. * tests/lint.scm ("formatting: tabulation", "formatting: trailing white space", "formatting: long line", "formatting: alright"): New tests. * doc/guix.texi (Invoking guix lint): Mention the 'formatting' checker.
* import: elpa: Fix typo.Alex Kost2015-08-10
| | | | | | | Reported by Eric Dvorsak <eric@dvorsak.fr> on #guix. * guix/scripts/import/elpa.scm (%default-options): Remove redundant quote which led to an error if --archive option was not specified.
* Fix typos in translatable strings.Ludovic Courtès2015-07-23
| | | | | | | | | Reported by Anders Jonsson <anders.jonsson@norsjovallen.se>. * gnu/packages/backup.scm, gnu/packages/databases.scm, gnu/packages/linux.scm, gnu/packages/perl.scm, gnu/packages/web.scm, guix/scripts/lint.scm, guix/scripts/publish.scm: Fix typos in translatable strings.
* size: Add '--substitute-urls' option.Ludovic Courtès2015-07-22
| | | | | | | * guix/scripts/size.scm (show-help, %options): Add --substitute-urls. (%default-options): Add 'substitute-urls'. (guix-size): Honor it. * doc/guix.texi (Invoking guix size): Document it.
* import: hackage: Remove reference to unbound variable.Ludovic Courtès2015-07-22
| | | | | * guix/scripts/import/hackage.scm (guix-import-hackage): Fix error message for imports from stdin, which referred to unbound variable 'package-name'.
* size: Remove leftover 'pk'.Ludovic Courtès2015-07-22
| | | | * guix/scripts/size.scm (profile->page-map): Remove leftover 'pk'.
* publish: Do not load archive content in memory.Ludovic Courtès2015-07-20
| | | | | | | | | | | | Previously, before replying to a /nar/* request, 'guix publish' would first build up the whole nar into memory (as a consequence of <http://bugs.gnu.org/21093>), which obviously doesn't scale. * guix/scripts/publish.scm (render-nar): Return STORE-PATH instead of a procedure that calls 'write-file'. (sans-content-length): New procedure. (http-write): For 'x-nix-archive', don't call '%http-write'. Instead, call 'write-file' right from here, using BODY as the file name.
* publish: Serve /nar requests in a separate thread.Ludovic Courtès2015-07-19
| | | | | | | * guix/scripts/publish.scm (%http-write): New variable. (http-write): New procedure. (concurrent-http-server): New variable. (run-publish-server): Use it.
* publish: Write hashes in nix-base32 format.Ludovic Courtès2015-07-18
| | | | | * guix/scripts/publish.scm (narinfo-string): Use 'bytevector->nix-base32-string', not 'bytevector->base32-string'.
* system: Add 'kernel-arguments' field.Ludovic Courtès2015-07-17
| | | | | | | | | | | | * gnu/system.scm (<operating-system>)[kernel-arguments]: New field. (operating-system-grub.cfg): Honor it. (operating-system-parameters-file): Add 'kernel-arguments' to the parameters file. * guix/scripts/system.scm (previous-grub-entries)[system->grub-entry]: Read the 'kernel-arguments' field of the parameters file, when available. * gnu/system/vm.scm (system-qemu-image/shared-store-script): Use (operating-system-kernel-arguments os) in '-append'. * doc/guix.texi (operating-system Reference): Document it.
* size: Gracefully handle EPIPE.Ludovic Courtès2015-07-15
| | | | * guix/scripts/size.scm (guix-size): Wrap body in 'leave-on-EPIPE'.
* 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.
* substitute: Improve functional decomposition.Ludovic Courtès2015-07-13
| | | | | | * guix/scripts/substitute.scm (display-narinfo-data, process-query, process-substitution): New procedures. Code moved from... (guix-substitute): ... here. Use them.
* guix build: Add '--substitute-urls' client option.Ludovic Courtès2015-07-13
| | | | | | | | | | | * guix/scripts/build.scm (%standard-build-options, show-build-options-help): Add --substitute-urls=URLS. (set-build-options-from-command-line): Honor it. * guix/store.scm (%default-substitute-urls): Make public. * doc/guix.texi (Substitutes): Add xref to the client --substitute-urls option. (Invoking guix build): Document it. (Invoking guix-daemon): Add 'daemon-substitute-urls' anchor.
* substitute: Honor "substitute-urls" option passed by "untrusted" clients.Ludovic Courtès2015-07-13
| | | | | | | | | | | | | | | | * guix/scripts/substitute.scm (or*): New macro. (%cache-url): Honor "untrusted-substitute-urls". * guix/tests.scm (%test-substitute-urls): New variable. (open-connection-for-tests): Use it. * tests/derivations.scm ("derivation-prerequisites-to-build and substitutes", "derivation-prerequisites-to-build and substitutes, non-substitutable build", "derivation-prerequisites-to-build and substitutes, local build"): Pass it to 'set-build-options'. * tests/guix-daemon.sh: Likewise. * tests/store.scm ("substitute query, alternating URLs"): New test. ("substitute query", "substitute", "substitute + build-things with output path", "substitute, corrupt output hash", "substitute --fallback"): Pass #:substitute-urls to 'set-build-options'.
* substitute: Store cached narinfo in cache-specific sub-directories.Ludovic Courtès2015-07-13
| | | | | | | | | | | | | | | | This ensures that switching between different substitute servers doesn't lead to a polluted narinfo cache. * guix/scripts/substitute.scm (narinfo-cache-file): Add 'cache-url' parameter. Add the base32 of CACHE-URL as a sub-directory under %NARINFO-CACHE-DIRECTORY. Update callers. (cached-narinfo): Likewise. Call 'mkdir-p' on the dirname of the cache file. Update callers. (remove-expired-cached-narinfos): Add 'directory' parameter and use it instead of %NARINFO-CACHE-DIRECTORY. (narinfo-cache-directories): New procedure. (maybe-remove-expired-cached-narinfo): Call 'remove-expired-cached-narinfos' for each item returned by 'narinfo-cache-directories'.
* substitute: Pass the cache URL instead of <cache> objects.Ludovic Courtès2015-07-13
| | | | | | | | | | | | * guix/scripts/substitute.scm (<cache>): Rename to... (<cache-info>): ... this. (open-cache): Rename to... (download-cache-info): ... this. Return a <cache-info> or #f. (open-cache*): Remove. (cache-narinfo!): Take a URL instead of a <cache> as the first parameter. (fetch-narinfos): Likewise. Call 'download-cache-info'. Remove use of 'force'. (guix-substitute): Replace calls to 'open-cache*' with %CACHE-URL.
* substitute: Remove unneeded conditionals.Ludovic Courtès2015-07-13
| | | | | * guix/scripts/substitute.scm (guix-substitute): Remove unneeded (if cache ...) forms since CACHE is always true (it's a promise.)
* guix lint: Remove duplicated module lines.Alex Kost2015-07-13
| | | | | | * guix/scripts/lint.scm (guix): Remove duplicated lines for using 'srfi-34' and 'srfi-35' modules. These lines were introduced twice by commits b210b35 and 002c57c.