summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Expand)Author
2015-12-09guix build: Add '--check'....* guix/derivations.scm (build-derivations): Add optional 'mode' parameter. * guix/scripts/build.scm (%default-options): Add 'build-mode'. (show-help, %options): Add '--check'. (guix-build): Honor 'build-mode' key of OPTS. Pass it to 'show-what-to-build' and 'build-derivations'. * doc/guix.texi (Invoking guix build): Document it. (Substitutes): Mention it. Ludovic Courtès
2015-12-08guix build: Add '--rounds'....* guix/scripts/build.scm (show-build-options-help) (%standard-build-options): Add --rounds. (set-build-options-from-command-line): Honor it. * doc/guix.texi (Invoking guix build): Document it. * doc/contributing.texi (Submitting Patches): Mention it. Ludovic Courtès
2015-12-07gnu-maintenance: Add GNOME updater....* guix/gnu-maintenance.scm (ftp-server/directory)[quirks]: Remove glib. (false-if-ftp-error): New macro. (latest-release*): Use it. (non-emacs-gnu-package?): Rename to... (pure-gnu-package?): ... this. Add call to 'gnome-package?'. (%gnu-updater): Adjust accordingly. (gnome-package?, latest-gnome-release): New procedures. (%gnome-updater): New variable. * guix/scripts/refresh.scm (%updaters): Add %GNOME-UPDATER. * doc/guix.texi (Invoking guix refresh): Mention it. Ludovic Courtès
2015-12-07refresh: Bail out when asked for a nonexistent updater....* guix/scripts/refresh.scm (lookup-updater): Call 'leave' when 'find' returns #f. Ludovic Courtès
2015-12-06edit: Don't assume that an emacs daemon is running....* guix/scripts/edit.scm (%editor): Use Emacs as a default value. Mathieu Lirzin
2015-12-06edit: Allow command line arguments in $VISUAL and $EDITOR....* guix/scripts/edit.scm (guix-edit): Fix the assumption that %editor is a one word command. Mathieu Lirzin
2015-12-01guix build: Modularize transformation handling....* guix/scripts/build.scm (options/resolve-packages): Remove. (options->things-to-build, transform-package-source): New procedure. (%transformations): New variable. (options->transformation): New procedure. (options->derivations): Rewrite to use 'options->things-to-build' and 'options->transformation'. Ludovic Courtès
2015-12-01guix package: Refactor 'options->installable'....* 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. Ludovic Courtès
2015-12-01guix package: Move 'process-actions' out of sight....* guix/scripts/package.scm (process-actions): New procedure, moved from... (guix-package): ... here. Adjust accordingly. Ludovic Courtès
2015-12-01guix package: Formalize the list of actions....* 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. Ludovic Courtès
2015-12-01guix package: Move 'build-and-use-profile' out of sight....* guix/scripts/package.scm (build-and-use-profile): New procedure. Adapted and moved from... (guix-package)[process-actions]: ... here. Adjust call sites. Ludovic Courtès
2015-12-01guix package: Move a couple of procedures out of sight....* guix/scripts/package.scm (ensure-default-profile, process-query): New procedures, moved from... (guix-package): ... here. Ludovic Courtès
2015-12-01guix package: Remove unnecessary use of (%store)....* guix/scripts/package.scm (delete-matching-generations): Use STORE instead of (%store). Ludovic Courtès
2015-11-29refresh: Check updater availability at run time....This is a followup to b68d2db, which added a check for updaters at macro-expansion time. The problem is that, when running 'guix pull', Guile-JSON is found, so the PyPi updater (say) is added to %UPDATERS, but then at run time Guile-JSON might be missing. Reported by orbea on #guix. * guix/scripts/refresh.scm (maybe-updater): Rewrite as 'syntax-rules'. Produce code that checks conditions at run time. (list-updaters): Update docstring. Ludovic Courtès
2015-11-29guix build: Factorize build log query....* guix/scripts/build.scm (show-build-log): New procedure. (guix-build): New variable 'items'. Use it and 'show-build-log'. Ludovic Courtès
2015-11-28environment: Set build options early on....This fixes a bug whereby some options, such as #:substitute-urls, would be passed to the daemon too late to have an effect. * guix/scripts/environment.scm (build-inputs): Remove call to 'set-build-options-from-command-line*'. (guix-environment): Add call to 'set-build-options-from-command-line' as early as possible. Ludovic Courtès
2015-11-28lint: Do not report already-patched vulnerabilities....* guix/scripts/lint.scm (patch-file-name): New procedure. (check-vulnerabilities): Use it to filter out patched vulnerabilities. * tests/lint.scm ("cve: one patched vulnerability"): New test. Ludovic Courtès
2015-11-28substitute: Warn upon store prefix mismatches....Suggested by Hynek Urban <hynek.urban@gmail.com>. * guix/scripts/substitute.scm (fetch-narinfos): Move body to... [do-fetch]: ... here. New procedure. Emit a warning when CACHE-INFO's prefix does not match. Ludovic Courtès
2015-11-26lint: Add "cve" checker....Fixes <http://bugs.gnu.org/21289>. * guix/scripts/lint.scm (package-name->cpe-name, package-vulnerabilities) (check-vulnerabilities): New procedures. * guix/scripts/lint.scm (%checkers): Add "cve" checker. * tests/lint.scm ("cve", "cve: one vulnerability"): New tests. * doc/guix.texi (Invoking guix lint): Mention it. Ludovic Courtès
2015-11-26import: hackage: Assume current 'ghc' package version....* guix/scripts/import/hackage.scm (%default-options): Do it. (ghc-default-version): New variable. Federico Beffa
2015-11-24guix package: Reduce startup time by ~50%....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. Ludovic Courtès
2015-11-23graph: Add '%bag-with-origins-node-type'....* guix/scripts/graph.scm (bag-node-edges): Remove 'filter' call. Add case for 'origin'. (%bag-node-type)[edges]: Add filtering here. (%bag-with-origins-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("bag DAG, including origins"): New test. * tests/guix-graph.sh: Add 'bag-with-origins'. * doc/guix.texi (Invoking guix graph): Document it. Ludovic Courtès
2015-11-23refresh: Add '--expression'....* guix/scripts/refresh.scm (%options, show-help): Add --expression. (guix-refresh): Honor it. * doc/guix.texi (Invoking guix refresh): Document it. Ludovic Courtès
2015-11-23guix download: Fail when more than one URL is passed....* guix/scripts/download.scm (guix-download)[parse-option]: Call 'leave' when passed an extra argument. * tests/guix-download.sh: Add test. Ludovic Courtès
2015-11-23guix download: Gracefully handle missing arguments....Fixes <http://bugs.gnu.org/21991>. Reported by Jan Synáček <jan.synacek@gmail.com>. * guix/scripts/download.scm (guix-download): Call 'leave' when OPTS does not contain an 'argument' key. Ludovic Courtès
2015-11-22ftp-client: Default port for 'ftp-open' is now "ftp"....* guix/ftp-client.scm (ftp-open): Change default #:port to "ftp". * guix/scripts/lint.scm (probe-uri): Remove 'port' parameter to 'ftp-open'. Ludovic Courtès
2015-11-21environment: Correctly handle abnormal exits....Fixes <http://bugs.gnu.org/21958>. * guix/scripts/environment.scm (status->exit-code): New procedure. (exit/status, primitive-exit/status): Use it. * tests/guix-environment-container.sh: Add test. Ludovic Courtès
2015-11-21refresh: Rewrite '--list-dependent' in terms of (guix graph)....* guix/scripts/refresh.scm (all-packages, list-dependents): New procedures. (guix-refresh): Use it. Ludovic Courtès
2015-11-21Add (guix graph)....* guix/scripts/graph.scm (<node-type>, <graph-backend>, emit-prologue) (emit-epilogue, emit-node, emit-edge, %graphviz-backend, export-graph): Move to... * guix/graph.scm: ... here. New file. * guix/scripts/system.scm, tests/graph.scm: Use it. * Makefile.am (MODULES): Add it. Ludovic Courtès
2015-11-12lint: Have connections time out after 3 seconds....* guix/scripts/lint.scm (probe-uri): Add #:timeout parameter. Pass it to 'open-connection-for-uri' and 'ftp-open'. (validate-uri): Pass #:timeout 3 to 'probe-uri'. Ludovic Courtès
2015-11-11guix gc: Error out when extra arguments are passed....Fixes <http://bugs.gnu.org/21817>. Reported by Petter Berntsen <petter@mykolab.ch>. * guix/scripts/gc.scm (guix-gc)[assert-no-extra-arguments]: New procedure. Use it for actions 'collect-garbage', 'optimize', and 'verify'. * tests/guix-gc.sh: Add tests. Ludovic Courtès
2015-11-11edit: Honor $VISUAL....Suggested by Andreas Enge <andreas@enge.fr>. * guix/scripts/edit.scm (%editor): Honor 'VISUAL' before 'EDITOR'. (show-help): Adjust accordingly. * doc/guix.texi (Invoking guix edit): Likewise. Ludovic Courtès
2015-11-11refresh: Avoid non-literal format string....Reported by Mathieu Lirzin <mthl@gnu.org>. * guix/scripts/refresh.scm (guix-refresh): Rewrite 'list-dependent?' report to avoid nested 'N_' calls. Ludovic Courtès
2015-11-11guix package: '--search-paths' can report combined search paths....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. Ludovic Courtès
2015-11-08refresh: Discard PyPI updater when Guile-JSON is missing....Reported by Sleep_Walker and Mathieu Lirzin <mthl@gnu.org>. * guix/scripts/refresh.scm (maybe-updater, list-updaters): New macros. (%updaters): Use 'list-updaters' instead of 'list'. Make %PYPI-UPDATER conditional. Ludovic Courtès
2015-11-05edit: Improve error reporting when $EDITOR is not found....Reported by Benno Evers <benno@bmevers.de> at <https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00125.html>. * guix/scripts/edit.scm (guix-edit): Wrap 'execl' call in 'catch'. Provide more meaningful error message. Ludovic Courtès
2015-11-05edit: Lift helper procedure....* guix/scripts/edit.scm (package->location-specification): New procedure, with code formerly... (guix-edit): ... here. Use it. Ludovic Courtès
2015-11-04import: hackage: Fix invalid use of 'leave'....Reported by Paul van der Walt <paul@denknerd.org> in <http://bugs.gnu.org/21829>. * guix/scripts/import/hackage.scm (guix-import-hackage): Add missing argument in call to 'leave'. Ludovic Courtès
2015-11-03scripts: container: Fix 'exec' command line parsing....* guix/scripts/container/exec.scm (partition-args): Reimplement such that all args up to and including the PID are returned as the first of the two values. David Thompson
2015-11-03import: pypi: add updater...* guix/import/pypi.scm (guix-package->pypi-name, latest-release): New procedures. (%pypi-updater): New variable. * guix/scripts/refresh.scm (%updaters): Add %PYPI-UPDATER. * doc/guix.texi (Invoking guix refresh): Mention PyPI Cyril Roelandt
2015-11-03scripts: environment: Display friendly container error messages....* guix/scripts/environment.scm (assert-container-features): New procedure. (guix-environment): Use it. David Thompson
2015-11-02guix system: Always build grub.cfg for 'init' and 'reconfigure'....Fixes <http://bugs.gnu.org/21068>. Reported by Germano Gabbianelli <tyrion.mx@gmail.com> and Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (perform-action): Always add GRUB.CFG to DRVS for 'init' and 'reconfigure'. Co-authored-by: Mark H Weaver <mhw@netris.org> Ludovic Courtès
2015-11-02services: Add 'system-service-type'....* gnu/services.scm (system-derivation): New procedure. (system-service-type): New variable. (boot-script-entry): New procedure. (boot-service-type): Extend SYSTEM-SERVICE-TYPE. (etc-entry): New procedure. (etc-service-type): Extend SYSTEM-SERVICE-TYPE. (fold-services): Change default #:target-type to SYSTEM-SERVICE-TYPE. * gnu/system.scm (operating-system-directory-base-entries): New procedure. (essential-services): Use it. Add an instance of SYSTEM-SERVICE-TYPE. (operating-system-boot-script): Pass #:target-type to 'fold-services'. (operating-system-derivation): Rewrite in terms of 'fold-services'. * gnu/system/linux-container.scm (system-container): Remove. (container-script): Use 'operating-system-derivation'. * guix/scripts/system.scm (export-extension-graph): Replace BOOT-SERVICE-TYPE by SYSTEM-SERVICE-TYPE. * doc/images/service-graph.dot: Add 'system' node and edges. * doc/guix.texi (Service Composition): Mention SYSTEM-SERVICE-TYPE. (Service Reference): Document it. Update 'fold-services' documentation. Ludovic Courtès
2015-11-02scripts: environment: Ignore user shell when spawning container....* guix/scripts/environment.scm (%default-options): Remove 'exec' association. (guix-environment): If the user didn't specify a command, use the default shell, or use /bin/sh when a container is requested. David Thompson
2015-11-02emacs: Add completions for '--type' option of 'refresh' popup....* guix/scripts/refresh.scm: Export '%updaters'. * emacs/guix-main.scm (refresh-updater-names): New procedure. * emacs/guix-base.el (guix-refresh-updater-names): New function. * emacs/guix-read.el (guix-read-refresh-updater-names, guix-read-refresh-updater-names-string): New functions. * emacs/guix-command.el (guix-command-improve-refresh-argument): Use 'guix-read-refresh-updater-names-string'. Alex Kost
2015-11-01scripts: Add 'container' subcommand....* guix/scripts/container.scm: New file. * guix/scripts/container/exec.scm: New file. * po/guix/POTFILES.in: Add them. * Makefile.am (MODULES): Add them. * doc/guix.texi (Invoking guix container): New section. David Thompson
2015-10-31guix system: Fix typo in --help message....* guix/scripts/system.scm (show-help): Align 'container' the same way as other actions. Alex Kost
2015-10-30scripts: environment: Allow lists of packages in expressions....* guix/scripts/environment.scm (options/resolve-packages): Match against lists of packages when evaluating expressions. * tests/guix-environment.sh: Add test. * doc/guix.texi ("invoking guix environment"): Add docs. David Thompson
2015-10-30scripts: system: Add 'container' action....* guix/scripts/system.scm (show-help): Display 'container' action. (system-derivation-for-action, guix-system): Add 'container' case. (perform-action): Skip GRUB config generation when building a container. * doc/guix.texi (Invoking guix system): Document it. David Thompson
2015-10-29scripts: environment: Allow mixing regular and ad-hoc packages....This patch changes the --ad-hoc flag to be positional. That is, the packages that appear before --ad-hoc are interpreted as packages whose inputs should be in the environment; the packages that appear after are interpreted as packages to be directly added to the environment. * guix/scripts/environment.scm (tag-package-arg, compact): New procedures. (%options): Tweak the handlers for --load and --expression options. (options/resolve-packages): Preserve package mode tag. (parse-args): Tweak argument handler to use package tagging procedure. (guix-environment): Apply ad-hoc behavior on a per package basis. * tests/guix-environment.sh: Add test. * doc/guix.texi ("invoking guix environment"): Document new behavior of --ad-hoc. David Thompson