summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* offload: Add 'ssh-options' field to <build-machine>.Ludovic Courtès2015-07-09
| | | | | | * guix/scripts/offload.scm (<build-machine>)[ssh-options]: New field. (remote-pipe): Use it. (send-files): Likewise.
* import: Add 'elpa' importer.Federico Beffa2015-07-08
| | | | | | | | | | | | * guix/import/elpa.scm: New file. * guix/scripts/import.scm: Add "elpa" to 'importers'. * guix/scripts/import/elpa.scm: New file. * Makefile.am (MODULES): Add 'guix/import/elpa.scm' and 'guix/scripts/import/elpa.scm'. (SCM_TESTS): Add 'tests/elpa.scm'. * doc/guix.texi (Invoking guix import): Document it. * tests/elpa.scm: New file. * po/guix/POTFILES.in: Add 'guix/scripts/import/elpa.scm'.
* gnu: system: Move <file-system-mapping> into (gnu system file-systems).David Thompson2015-07-07
| | | | | | * gnu/system/vm.scm (<file-system-mapping>, %store-mapping): Move from here... * gnu/system/file-systems.scm: ...to here. * guix/scripts/system.scm: Import (gnu system file-systems).
* substitute: Avoid infinite loop when updating the substitute list.Andy Patterson2015-07-07
| | | | | | | | | | Reported at <http://lists.gnu.org/archive/html/guix-devel/2015-07/msg00119.html>. * guix/scripts/substitute.scm (http-multiple-get): When RESP has "Connection: close", consume HEAD anyway; always call PROC to read from BODY. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* scripts: environment: Return the exit status of the command.Cyril Roelandt2015-07-02
| | | | | * guix/scripts/environment.scm (guix-environment): Return the exit status of the command.
* environment: Define 'GUIX_ENVIRONMENT'.Ludovic Courtès2015-07-01
| | | | | | | * guix/scripts/environment.scm (create-environment): Define 'GUIX_ENVIRONMENT'. * doc/guix.texi (Invoking guix environment): Document it. * gnu/system/shadow.scm (default-skeletons): Adjust 'PS1' depending on whether 'GUIX_ENVIRONMENT' is defined.
* environment: Improve error reporting for '-l'.Ludovic Courtès2015-07-01
| | | | | | | | | | | This fixes two problems: 1. Load errors would print an ugly backtrace. 2. When FILE was an absolute name, 'load' was passed an incorrect file name. * guix/scripts/environment.scm (options/resolve-packages): Use 'load*' instead of 'load'.
* environment: For --ad-hoc, allow users to specify an output.Ludovic Courtès2015-07-01
| | | | | | | | | | | | * guix/scripts/environment.scm (package+propagated-inputs): Add 'output' parameter. Use it in return value. (options/resolve-packages): Use 'append-map' instead of 'map'. For 'load' and 'expression', return all the outputs of the resulting package. For 'package', use 'specification->package+output' instead of 'specification->package'. (guix-environment): Adjust uses of PACKAGES accordingly. * doc/guix.texi (Invoking guix environment): Document it. * tests/guix-environment.sh: Add test for --ad-hoc guile-bootstrap:out.
* environment: Add --system.Ludovic Courtès2015-07-01
| | | | | | | * guix/scripts/environment.scm (show-help, %options): Add -s/--system. (%default-options): Add 'system' pair. (guix-environment): Pass 'system' value from OPTS to 'lower-inputs'. * doc/guix.texi (Invoking guix environment): Document it.
* environment: Add only the specified outputs of the dependencies.Ludovic Courtès2015-07-01
| | | | | | | | | | | | | | | | | | | | Before that, 'guix environment guile' (for instance) would define environment variables that would refer to the "include" output of Bash, the "debug" output of libgc, etc., even though these are not listed as inputs in the recipe of 'guile'. * guix/gexp.scm (lower-inputs): Export. * guix/scripts/environment.scm (evaluate-input-search-paths): Remove 'derivations' parameter; add 'search-paths'. Expect 'inputs' to be a list of tuples. Adjust callers. (create-environment): Remove 'derivations' parameter; add 'search-paths'. (show-search-paths): Likewise. (package+propagated-inputs): New procedure. (packages->transitive-inputs, packages+propagated-inputs): Remove. (build-inputs): Expect INPUTS to be a list of derivation tuples. (guix-environment): Compute INPUTS using 'package+propagated-inputs', 'package->bag', and 'bag-transitive-inputs'. Move 'run-with-store' higher. * tests/guix-environment.sh: Add test with FINDUTILS-BOOT0.
* size: Add '--map-file' option.Ludovic Courtès2015-06-21
| | | | | | | | | * guix/scripts/size.scm (profile->page-map): New procedures. (show-help, %options): Add --map-file. (guix-size): Honor it. * doc/guix.texi (Invoking guix size): Document it. * doc/images/coreutils-size-map.png: New file. * doc.am (dist_infoimage_DATA): Add it.
* size: Remove unused variables.Ludovic Courtès2015-06-21
| | | | | * guix/scripts/size.scm (ensure-store-item): Remove #:dry-run? parameter. (%options): Remove 'dry-run?' variable.
* Add 'guix size'.Ludovic Courtès2015-06-18
| | | | | | | | | | | | | | | * guix/scripts/size.scm: New file. * Makefile.am (MODULES): Add it. (SCM_TESTS): Add tests/size.scm. * doc.am (SUBCOMMANDS): Add 'size'. * po/guix/POTFILES.in: Add guix/scripts/size.scm. * tests/size.scm: New file. * doc/guix.texi (Packages with Multiple Outputs): Add xref to "Invoking guix size". (Invoking guix size): New node. (Invoking guix gc): Add index for "closure" and xref to the above. * doc/contributing.texi (Submitting Patches): Use @enumerate for the check list. Add item about 'guix size'.
* Add 'guix edit'.Ludovic Courtès2015-06-18
| | | | | | | | | * guix/scripts/edit.scm: New file. * Makefile.am (MODULES): Add it. * doc.am (SUBCOMMANDS): Add 'edit'. * doc/guix.texi (Defining Packages): Add xref to "Invoking guix edit". (Invoking guix edit): New node. * po/guix/POTFILES.in: Add it.
* Move 'specification->package+output' to (gnu packages).Ludovic Courtès2015-06-18
| | | | | | * guix/scripts/package.scm (specification->package+output): Move to... * gnu/packages.scm (specification->package+output): ... here * guix/scripts/archive.scm (guix): Adjust accordingly.
* offload: Fix sorting bug in 'choose-build-machine'.Mark H Weaver2015-06-17
| | | | | * guix/scripts/offload.scm (choose-build-machine)[undecorate]: Return the boolean result of pred instead of the best machine+slot.
* guix build: Allow directories to be passed to --with-source.Ludovic Courtès2015-06-11
| | | | | | | | | | * guix/scripts/build.scm (package-with-source)[tarball-base-name]: Gracefully handle file names that lack an extension. Pass #:recursive? #t to 'download-to-store'. * guix/download.scm (download-to-store): Add #:recursive? parameter and pass it to 'add-to-store'. * doc/guix.texi (Invoking guix build): Add an example of --with-source with a directory.
* environment: Connect to the store after the command line has been parsed.Ludovic Courtès2015-06-11
| | | | | | * guix/scripts/environment.scm (guix-environment): Call 'parse-command-line' outside of 'with-store'. This allows things like --help to run even if the daemon is not running.
* guix system: init: Overwrite the items in the target store.Ludovic Courtès2015-06-10
| | | | | | | | Fixes <http://bugs.gnu.org/20722>. Reported by Eric Bavier <ericbavier@openmailbox.org>. * guix/scripts/system.scm (copy-item): Check whether DEST exists and remove it if it does.
* import: hackage: Refactor parsing code and add new options.Federico Beffa2015-06-09
| | | | | | | | | | | | * guix/import/cabal.scm: New file. * guix/import/hackage.scm: Update to use the new Cabal parsing module. * tests/hackage.scm: Update tests. * guix/scripts/import/hackage.scm: Add new '--cabal-environment' and '--stdin' options. * doc/guix.texi: ... and document them. * Makefile.am (MODULES): Add 'guix/import/cabal.scm', 'guix/import/hackage.scm' and 'guix/scripts/import/hackage.scm'. (SCM_TESTS): Add 'tests/hackage.scm'.
* guix: Clean up --help messages.Alex Kost2015-06-08
| | | | | | | | | | * guix/scripts/import.scm (show-help): Add newline before a list of importers. * guix/scripts/lint.scm (show-help): Split a long description line. * guix/scripts/package.scm (show-help): Improve docstrings for --install and --remove options. * guix/scripts/system.scm (show-help): Format actions the same way as guix commands and importers are formatted.
* guix gc: Add '--verify'.Ludovic Courtès2015-06-06
| | | | | | | * guix/scripts/gc.scm (show-help, %options): Add --verify. (guix-gc): Handle it. * doc/guix.texi (Invoking guix gc): Document --verify, and move --optimize description right below it.
* guix package: Fix typo in --help message.Alex Kost2015-06-06
| | | | * guix/scripts/package.scm (show-help): Align '--show' option properly.
* lint: source: Warn only when all the URIs are unreachable.Ludovic Courtès2015-05-31
| | | | | | | * guix/scripts/lint.scm (call-with-accumulated-warnings): New procedure. (with-accumulated-warnings): New macro. (check-source): Add 'try-uris' and use it. Emit warnings only upon failure.
* lint: 'validate-uri' really returns #f on failure.Ludovic Courtès2015-05-31
| | | | * guix/scripts/lint.scm (validate-uri): Always return #f on failure.
* emacs: Report about "search paths" after operation.Alex Kost2015-05-29
| | | | | * guix/scripts/package.scm: Export 'display-search-paths'. * emacs/guix-main.scm (process-package-actions): Use it.
* guix environment: Add --ad-hoc option.David Thompson2015-05-28
| | | | | | | | * guix/scripts/environment.scm (%options): Add "ad-hoc" option. (show-help): Display help for "--ad-hoc". (packages+propagated-inputs): New procedure. (guix-environment): Create ad hoc environment when asked. * doc/guix.texi ("invoking guix environment"): Document it.
* gc: ignore trailing slash or subdirectories for `guix gc -d'Cyrill Schenkel2015-05-26
| | | | | | | | | | Fixes <http://bugs.gnu.org/19757>. * guix/scripts/gc.scm (guix-gc): Convert paths to direct store paths. * guix/store.scm (direct-store-path): Get rid of subdirectories in store path. * tests/guix-gc.sh: New tests. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* guix system: Add '--on-error'.Ludovic Courtès2015-05-25
| | | | | | | | | | * guix/ui.scm (load*): Add #:on-error parameter. [tag, error-string]: New variables. Wrap 'load' call in 'call-with-prompt'. Pass TAG to 'make-stack'. Honor ON-ERROR after 'report-load-error' call. (report-load-error): Change to not exit on error. Make private. * guix/scripts/system.scm (show-help, %options): Add --on-error. (guix-system): Use 'load*' and pass it #:on-error.
* guix package: --manifest DTRT when combined with --dry-run.Ludovic Courtès2015-05-25
| | | | | | | * guix/scripts/package.scm (guix-package)[process-actions]: Process 'manifest action regardless of whether 'dry-run? is set. Adjust the message accordingly. * tests/guix-package.sh: Add error-reporting test.
* guix system: init: Copy the closure of 'grub.cfg', not that of the system.Ludovic Courtès2015-05-24
| | | | | | | | Fixes <http://bugs.gnu.org/20591>. Reported by Daniel Pimentel <d4n1@openmailbox.org>. * guix/scripts/system.scm (install): Copy the closure of GRUB.CFG rather than that of OS-DIR.
* guix system: Always add zero previous entries in grub.cfg for 'init'.Ludovic Courtès2015-05-24
| | | | | | * guix/scripts/system.scm (grub.cfg): Remove. (perform-action): Call 'operating-system-grub.cfg' with the empty list as the 2nd argument when ACTION is 'init.
* guix system: init: Make sure the target is root-owned.Ludovic Courtès2015-05-24
| | | | | | | Suggested by Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (install): Add 'chown' and 'chmod' calls for TARGET when running as root, and warn otherwise.
* guix package: Adjust --help message.Ludovic Courtès2015-05-21
| | | | | * guix/scripts/package.scm (show-help): Add KIND parameter for --search-paths as a followup to dbc31ab.
* scripts: Move 'set-build-options-from-command-line*' to (guix scripts build) ↵David Thompson2015-05-21
| | | | | | | | module. * guix/scripts/build.scm (set-build-options-from-command-line*): New procedure. * guix/scripts/environment.scm (set-build-options-from-command-line*): Delete.
* ui: Deduplicate 'show-what-to-build*'.David Thompson2015-05-21
| | | | | | | * guix/ui.scm (show-what-to-build*): New procedure. * guix/scripts/environment.scm (show-what-to-build*): Delete. * guix/scripts/system.scm (show-what-to-build*): Likewise. * build-aux/make-binary-tarball.scm (show-what-to-build*): Likewise.
* package: Add --manifest option.David Thompson2015-05-20
| | | | | | | | * guix/scripts/package.scm (show-help): Add help text. (%options): Add manifest option. (guix-package): Add manifest option handler. * doc/guix.texi ("Invoking guix package"): Document it. * tests/guix-package.sh: Add test.
* ui: Factorize user-provided Scheme file loading.David Thompson2015-05-20
| | | | | | | * guix/ui.scm (make-user-module, load*): New procedures. * guix/scripts/system.scm (%user-module): Define in terms of 'make-user-module'. (read-operating-system): Define in terms of load*'.
* guix package: Add optional argument to --search-paths.Ludovic Courtès2015-05-20
| | | | | | | | | | | | * guix/scripts/package.scm (search-path-environment-variables): Add #:kind parameter. Pass it to 'environment-variable-definition'. (display-search-paths): Add #:kind parameter and pass it to 'search-path-environment-variables'. (%options): Add an optional parameter for "--search-paths". (guix-package)[process-query]: Handle it. * tests/guix-package-net.sh: Adjust existing test. * tests/guix-package.sh: Adjust existing tests and add new test. * doc/guix.texi (Invoking guix package): Document it.
* guix package: --search-paths mentions $PATH.Ludovic Courtès2015-05-20
| | | | | * guix/scripts/package.scm (search-path-environment-variables): Add $PATH to SEARCH-PATHS.
* guix gc: Add '--optimize'.Ludovic Courtès2015-05-19
| | | | | * guix/scripts/gc.scm (show-help, %options): Add --optimize. (guix-gc): Handle it.
* publish: Add '--listen'.Ludovic Courtès2015-05-12
| | | | | | | | | | | * guix/scripts/publish.scm (show-help, %options): Add --listen. (getaddrinfo*): New procedure. (%default-options): Add 'address'. (open-server-socket): Replace 'addr' and 'port' with 'address', a sockaddr. (guix-publish): Adjust accordingly. Augment "publishing" message with the actual address. * doc/guix.texi (Invoking guix publish): Document it.
* publish: Add '--user' option.Ludovic Courtès2015-05-12
| | | | | | | | | | | | * guix/scripts/publish.scm (show-help): Add --user. (%options): Likewise. (run-publish-server): Change 'port' parameter to 'socket'. Pass #:socket instead of #:addr and #:port to 'run-server'. Update caller accordingly. (open-server-socket, gather-user-privileges): New procedures. (guix-publish): Use them. Force %PRIVATE-KEY and %PUBLIC-KEY early on. Warn when running as root. * doc/guix.texi (Invoking guix publish): Document --user.
* Remove assorted Guile 2.0.5 workarounds.Ludovic Courtès2015-05-10
| | | | | | | | * guix/scripts/authenticate.scm (%default-port-conversion-strategy): Remove. * guix/scripts/substitute.scm (fetch): Remove 2.0.5 special cases. * guix/serialization.scm (write-file): Remove 'scandir' workaround. * guix/ui.scm (command-files): Likewise.
* download: Work around Guile small-receive-buffer bug.Ludovic Courtès2015-05-06
| | | | | | | | | | | | | | | | Previously, code using directly (guix build download) was still affected by <http://bugs.gnu.org/15368>. This includes source derivations, the 'guix download' command, and (guix gnu-maintenance). 'guix substitute' was unaffected since it used (guix http-client), which already had the fix. * guix/http-client.scm (open-socket-for-uri): Remove. (http-fetch): Remove #:buffered? argument to 'open-socket-for-uri'; use 'setvbuf' instead. * guix/scripts/substitute.scm (fetch): Likewise. * guix/build/download.scm (open-socket-for-uri): New procedure, taken from guix/http-client.scm, but without the #:buffered? parameter.
* environment: Move iteration outside of 'for-each-search-path'.Ludovic Courtès2015-05-05
| | | | | | | | | | | * guix/search-paths.scm (search-path-definition): New procedure. * guix/scripts/environment.scm (for-each-search-path): Rename to... (evaluate-input-search-paths): ... this. Remove 'proc' and 'pure?' parameters, and return directly the list of search-path/value pairs. (create-environment): Use 'for-each' and 'evaluate-input-search-paths' instead of 'for-each-search-path'. (show-search-paths): Use 'for-each', 'search-path-definition', and 'evaluate-search-paths' instead of 'for-each-search-path'.
* environment: Use 'evaluate-search-paths'.Ludovic Courtès2015-05-05
| | | | | | | | | This allows 'guix environment' to correctly handle non-directory and/or pattern search-path specifications, such as that for 'XML_CATALOG_FILES'. * guix/scripts/environment.scm (for-each-search-path): Use 'evaluate-search-paths' instead of 'search-path-as-list' & co.
* search-paths: Define the 'PATH' environment variable.Ludovic Courtès2015-05-05
| | | | | * guix/search-paths.scm ($PATH): New variable. * guix/scripts/environment.scm (for-each-search-path): Use it.
* search-paths: 'evaluate-search-paths' can be passed a list of directories.Ludovic Courtès2015-05-05
| | | | | | | * guix/search-paths.scm (evaluate-search-paths): Change 'directory' to 'directories', and adjust 'search-path-as-list' accordingly. * guix/scripts/package.scm (search-path-environment-variables): Adjust call accordingly.
* environment: Use (guix search-paths).Ludovic Courtès2015-05-05
| | | | | * guix/scripts/environment.scm: Use (guix search-paths). Fixes a regression introduced in e89431b.