summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* 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 build: Separate transformation options.Ludovic Courtès2016-02-01
| | | | | | | | | | | * guix/scripts/build.scm (%transformation-options): New variable. (show-transformation-options-help): New procedure. (show-help): Remove '--with-source' documentation and add 'show-transformation-options-help' call. (%options): Remove "with-source" and append %TRANSFORMATION-OPTIONS. * doc/guix.texi (Package Transformation Options): New node. Document '--with-source', moved from... (Additional Build Options): ... here.
* guix build: Transformations operate on single objects.Ludovic Courtès2016-02-01
| | | | | | | | | | | * guix/scripts/build.scm (transform-package-source): Return a procedure that expects a single object rather than a list of packages. (options->transformation): Rewrite to precompute the list of applicable transformations and to return a procedure that expects a single object rather than a list of objects. (options->derivations): Adjust accordingly. * tests/scripts-build.scm: New file. * Makefile.am (SCM_TESTS): Add it.
* guix system: Rename 'dmd-graph' to 'shepherd-graph'.Alex Kost2016-01-29
| | | | | | | | | | | | | | | | * doc/images/dmd-graph.dot: Rename to... * doc/images/shepherd-graph.dot: ... this. * doc.am (DOT_FILES): Adjust accordingly. * guix/scripts/system.scm (dmd-service-node-label) (dmd-service-node-type, export-dmd-graph): Rename to... (shepherd-service-node-label, shepherd-service-node-type) (export-shepherd-graph): ... this. (show-help, process-action, process-command): Rename 'dmd-graph' to 'shepherd-graph'. * emacs/guix-command.el (guix-command-additional-execute-arguments) (guix-command-special-executors): Likewise. * doc/guix.texi: Likewise. * doc/emacs.texi (Emacs Popup Interface): Likewise.
* services: Rename 'dmd' services to 'shepherd'.Alex Kost2016-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/services/shepherd.scm (dmd-root-service-type, %dmd-root-service) (dmd-service-type, <dmd-service>, dmd-service, dmd-service?) (make-dmd-service, dmd-service-documentation, dmd-service-provision) (dmd-service-requirement, dmd-service-respawn, dmd-service-start) (dmd-service-stop, dmd-service-auto-start?, dmd-service-modules) (dmd-service-imported-modules, dmd-service-file-name, dmd-service-file) (dmd-service-back-edges): Rename to... (shepherd-root-service-type, %shepherd-root-service, shepherd-service-type) (<shepherd-service>, shepherd-service, shepherd-service?) (make-shepherd-service, shepherd-service-documentation) (shepherd-service-provision, shepherd-service-requirement) (shepherd-service-respawn, shepherd-service-start) (shepherd-service-stop, shepherd-service-auto-start?) (shepherd-service-modules, shepherd-service-imported-modules) (shepherd-service-file-name, shepherd-service-file) (shepherd-service-back-edges): ...this * gnu/services.scm: Adjust comments. * gnu/services/avahi.scm (avahi-dmd-service): Rename to... (avahi-shepherd-service): ... this. * gnu/services/base.scm (%root-file-system-dmd-service) (file-system->dmd-service-name, mapped-device->dmd-service-name) (dependency->dmd-service-name, file-system-dmd-service) (mingetty-dmd-service, nscd-dmd-service, guix-dmd-service) (guix-publish-dmd-service, udev-dmd-service, gpm-dmd-service): Rename to... (%root-file-system-shepherd-service) (file-system->shepherd-service-name, mapped-device->shepherd-service-name) (dependency->shepherd-service-name, file-system-shepherd-service) (mingetty-shepherd-service, nscd-shepherd-service, guix-shepherd-service) (guix-publish-shepherd-service, udev-shepherd-service) (gpm-shepherd-service): ... this. * gnu/services/databases.scm (postgresql-dmd-service): Rename to... (postgresql-shepherd-service): ... this. * gnu/services/desktop.scm (upower-dmd-service, elogind-dmd-service): Rename to... (upower-shepherd-service, elogind-shepherd-service): ... this. * gnu/services/dbus.scm (dbus-dmd-service): Rename to... (dbus-shepherd-service): ... this. * gnu/services/lirc.scm (lirc-dmd-service): Rename to... (lirc-shepherd-service): ... this. * gnu/services/mail.scm (dovecot-dmd-service): Rename to... (dovecot-shepherd-service): ... this. * gnu/services/networking.scm (ntp-dmd-service, tor-dmd-service) (bitlbee-dmd-service, wicd-dmd-service, network-manager-dmd-service): Rename to... (dbus-shepherd-service): ... this. * gnu/services/ssh.scm (lsh-dmd-service): Rename to... (lsh-shepherd-service): ... this. * gnu/services/web.scm (nginx-dmd-service): Rename to... (nginx-shepherd-service): ... this. * gnu/services/xorg.scm (slim-dmd-service): Rename to... (slim-shepherd-service): ... this. * gnu/system.scm (essential-services): Use '%shepherd-root-service'. * gnu/system/install.scm (cow-store-service-type): Adjust accordingly. * guix/scripts/system.scm (dmd-service-node-label, dmd-service-node-type) (export-dmd-graph): Likewise. * tests/guix-system.sh: Likewise. * tests/services.scm ("dmd-service-back-edges"): Rename to... ("shepherd-service-back-edges"): Adjust accordingly. * doc/guix.texi: Likewise. * doc/images/service-graph.dot: Use 'shepherd' service name.
* Rename (gnu services dmd) to (gnu services shepherd).Alex Kost2016-01-29
| | | | | | | | | | | | | | | | | | | | | | | | * gnu/services/dmd.scm: Rename to... * gnu/services/shepherd.scm: ... this. * gnu/system.scm: Use it. * gnu/system/install.scm: Likewise. * gnu/services/xorg.scm: Likewise. * gnu/services/web.scm: Likewise. * gnu/services/ssh.scm: Likewise. * gnu/services/networking.scm: Likewise. * gnu/services/mail.scm: Likewise. * gnu/services/lirc.scm: Likewise. * gnu/services/desktop.scm: Likewise. * gnu/services/dbus.scm: Likewise. * gnu/services/databases.scm: Likewise. * gnu/services/base.scm: Likewise. * gnu/services/avahi.scm: Likewise. * guix/scripts/system.scm: Likewise. * tests/services.scm: Likewise. * tests/guix-system.sh: Likewise. * doc/guix.texi (Shepherd Services): Adjust accordingly. * gnu-system.am (GNU_SYSTEM_MODULES): Likewise. * po/guix/POTFILES.in: Likewise.
* lint: Rewrite 'check-patch-file-names'.Mathieu Lirzin2016-01-28
| | | | | * guix/scripts/lint.scm (check-patch-file-names): Improve clarity by reversing the logic.
* lint: Remove an unneeded clause in 'check-patch-file-names'.Mathieu Lirzin2016-01-28
| | | | | | * guix/scripts/lint.scm (check-patch-file-names): Don't check if patches start with the package full name since matching the package name (which is a prefix of the full name) is sufficient.
* import: Add Bioconductor importer and updater.Ricardo Wurmus2016-01-20
| | | | | | | | | | | | | | | | | * guix/import/cran.scm (%bioconductor-updater, latest-bioconductor-release, bioconductor-package?): New procedures. (cran->guix-package): Support repositories other than CRAN. (%bioconductor-url, %bioconductor-svn-url): New variables. (description->package): Update signature to distinguish between packages from different repositories. (latest-release): Rename procedure ... (latest-cran-release): ... to this. (cran-package?): Do not assume all R packages are available on CRAN. * tests/cran.scm: Update tests. * guix/scripts/import/cran.scm: Add "--archive" option and default to CRAN. * guix/scripts/refresh.scm (%updaters): Add "%bioconductor-updater". * doc/guix.texi: Document Bioconductor importer and updater.
* guix build: Add '--keep-going'.Ludovic Courtès2016-01-19
| | | | | | | | * guix/scripts/build.scm (show-build-options-help) (%standard-build-options): Add --keep-going. * guix/scripts/build.scm (set-build-options-from-command-line): Honor it. * doc/guix.texi (Invoking guix build): Document it.
* Move <boot-parameters> to (gnu system).Alex Kost2016-01-16
| | | | | | | | | | * guix/scripts/system.scm (previous-grub-entries) (display-system-generation): Use accessors instead of matching <boot-parameters>. (boot-parameters, boot-parameters?, boot-parameters-label) (boot-parameters-root-device, boot-parameters-kernel) (boot-parameters-kernel-arguments, read-boot-parameters): Move to... * gnu/system.scm: ... here. Export them.
* lint: cve: Catch host name lookup errors.Ludovic Courtès2016-01-06
| | | | | * guix/scripts/lint.scm (package-vulnerabilities): Catch 'getaddrinfo-error'.
* 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.
* graph: %BAG-WITH-ORIGINS-NODE-TYPE includes the origin's guile.Ludovic Courtès2016-01-02
| | | | | | | | | | Before that it would include #f for most origins since that the default value of 'origin-patch-guile'. * guix/scripts/graph.scm (bag-node-edges): When 'origin-patch-guile' returns #f, use (default-guile). * tests/graph.scm ("bag DAG, including origins"): Check for an edge from O to (default-guile).
* graph: %BAG-EMERGED-NODE-TYPE filters out origins.Ludovic Courtès2016-01-02
| | | | | | | | Fixes <http://bugs.gnu.org/22280>. Reported by Leo Famulari <leo@famulari.name>. * guix/scripts/graph.scm (%bag-emerged-node-type)[edges]: Mimic %BAG-NODE-TYPE. This is a followup to 38b92da.
* guix build: Augment %PATCH-PATH when -L is passed.Ludovic Courtès2015-12-30
| | | | | | | | | Fixes <http://bugs.gnu.org/22259>. Reported by Nikolay Merinov <nikolay.merinov@member.fsf.org>. * guix/scripts/build.scm (%standard-build-options) <-L>: Augment %PATCH-PATH. * tests/guix-package.sh: Add test.
* guix package: Fix typo in comment.Leo Famulari2015-12-25
| | | | * guix/scripts/package.scm: Fix typo.
* lint: The CPE name of GRUB is "grub2".Ludovic Courtès2015-12-20
| | | | | | Reported by Leo Famulari. * guix/scripts/lint.scm (package-name->cpe-name): Add "grub".
* guix build: Gracefully handle type errors in -e and -f.Ludovic Courtès2015-12-13
| | | | | | * guix/scripts/build.scm (options->things-to-build)[validate-type]: New procedure. [ensure-list]: Use it.
* guix build: Remove dead code.Ludovic Courtès2015-12-13
| | | | | * guix/scripts/build.scm (options->things-to-build): Remove unused 'match' clause.
* guix build: Add '--check'.Ludovic Courtès2015-12-09
| | | | | | | | | | | * 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.
* guix build: Add '--rounds'.Ludovic Courtès2015-12-08
| | | | | | | | * 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.
* gnu-maintenance: Add GNOME updater.Ludovic Courtès2015-12-07
| | | | | | | | | | | | | * 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.
* refresh: Bail out when asked for a nonexistent updater.Ludovic Courtès2015-12-07
| | | | | * guix/scripts/refresh.scm (lookup-updater): Call 'leave' when 'find' returns #f.
* edit: Don't assume that an emacs daemon is running.Mathieu Lirzin2015-12-06
| | | | * guix/scripts/edit.scm (%editor): Use Emacs as a default value.
* edit: Allow command line arguments in $VISUAL and $EDITOR.Mathieu Lirzin2015-12-06
| | | | | * guix/scripts/edit.scm (guix-edit): Fix the assumption that %editor is a one word command.
* guix build: Modularize transformation handling.Ludovic Courtès2015-12-01
| | | | | | | | | * 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'.
* 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).
* refresh: Check updater availability at run time.Ludovic Courtès2015-11-29
| | | | | | | | | | | | | 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.
* guix build: Factorize build log query.Ludovic Courtès2015-11-29
| | | | | * guix/scripts/build.scm (show-build-log): New procedure. (guix-build): New variable 'items'. Use it and 'show-build-log'.
* environment: Set build options early on.Ludovic Courtès2015-11-28
| | | | | | | | | | 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.
* lint: Do not report already-patched vulnerabilities.Ludovic Courtès2015-11-28
| | | | | | * 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.
* substitute: Warn upon store prefix mismatches.Ludovic Courtès2015-11-28
| | | | | | | | 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.
* lint: Add "cve" checker.Ludovic Courtès2015-11-26
| | | | | | | | | | 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.
* import: hackage: Assume current 'ghc' package version.Federico Beffa2015-11-26
| | | | | * guix/scripts/import/hackage.scm (%default-options): Do it. (ghc-default-version): New variable.
* 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.
* graph: Add '%bag-with-origins-node-type'.Ludovic Courtès2015-11-23
| | | | | | | | | | | * 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.
* refresh: Add '--expression'.Ludovic Courtès2015-11-23
| | | | | | * guix/scripts/refresh.scm (%options, show-help): Add --expression. (guix-refresh): Honor it. * doc/guix.texi (Invoking guix refresh): Document it.
* guix download: Fail when more than one URL is passed.Ludovic Courtès2015-11-23
| | | | | | * guix/scripts/download.scm (guix-download)[parse-option]: Call 'leave' when passed an extra argument. * tests/guix-download.sh: Add test.
* guix download: Gracefully handle missing arguments.Ludovic Courtès2015-11-23
| | | | | | | | 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.
* ftp-client: Default port for 'ftp-open' is now "ftp".Ludovic Courtès2015-11-22
| | | | | | * guix/ftp-client.scm (ftp-open): Change default #:port to "ftp". * guix/scripts/lint.scm (probe-uri): Remove 'port' parameter to 'ftp-open'.
* environment: Correctly handle abnormal exits.Ludovic Courtès2015-11-21
| | | | | | | | 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.
* refresh: Rewrite '--list-dependent' in terms of (guix graph).Ludovic Courtès2015-11-21
| | | | | | * guix/scripts/refresh.scm (all-packages, list-dependents): New procedures. (guix-refresh): Use it.
* Add (guix graph).Ludovic Courtès2015-11-21
| | | | | | | | | * 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.
* lint: Have connections time out after 3 seconds.Ludovic Courtès2015-11-12
| | | | | | * 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'.