summaryrefslogtreecommitdiff
path: root/guix/ui.scm
AgeCommit message (Collapse)Author
2015-10-25scripts: environment: Add --container option.David Thompson
* 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.
2015-09-24lint: Check non-translated package descriptions.Mathieu Lirzin
* guix/ui.scm (texi->plain-text): Export. * guix/scripts/lint.scm (check-description-style): Use it instead of 'package-description-string'.
2015-09-24ui: Gracefully handle Unicode description strings.Ludovic Courtès
Fixes <http://bugs.gnu.org/21536>. Reported by Alex Kost <alezost@gmail.com>. * guix/ui.scm (texi->plain-text): Wrap body in 'with-fluids'. * tests/ui.scm ("package-description-string vs. Unicode"): New test.
2015-09-18ui: Add 'show-derivation-outputs'.Alex Kost
* guix/scripts/build.scm (guix-build): Extract code from here and move to... * guix/ui.scm (show-derivation-outputs): ... here. New procedure.
2015-09-18Add (guix scripts).Alex Kost
* 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.
2015-09-08ui: Add package-description-string.Mathieu Lirzin
Provide support for Texinfo's markup in package description. * guix/ui.scm (%text-width): New parameter. (texi->plain-text): New variable. (package->recutils): Use them. (package-description-string): New variable. * emacs/guix-main.scm (%package-param-alist): Use it. * gnu/packages/perl.scm (perl-devel-globaldestruction) (perl-devel-lexalias, perl-exporter-lite): Adapt to Texinfo's markup. * gnu/packages/python.scm (python2-empy): Likewise.
2015-09-06ui: Change 'P_' to return the empty string when passed the empty string.Ludovic Courtès
Reported by Mathieu Lirzin <mathieu.lirzin@etu.u-bordeaux.fr> at <https://lists.gnu.org/archive/html/guix-devel/2015-09/msg00111.html>. * guix/ui.scm (P_): Check whether MSGID is empty, and return it if it is.
2015-08-30ui: Add 'run-guix'.Alex Kost
* guix/ui.scm (guix-main): Move the code to run guix command line to ... (run-guix): ...here. New procedure. Export it.
2015-08-24guix package: -s shows outputs.Mark H Weaver
* guix/ui.scm (package->recutils): Print "outputs:".
2015-07-15ui: Add 'leave-on-EPIPE'.Ludovic Courtès
* guix/scripts/package.scm (leave-on-EPIPE): Move to... * guix/ui.scm (leave-on-EPIPE): ... here.
2015-06-10ui: Replace the global 'symlink' binding.Ludovic Courtès
* guix/ui.scm (symlink): Set! the global symlink.
2015-05-31ui: Do not call 'display-error' for SRFI-34 exceptions.Ludovic Courtès
* guix/ui.scm (report-load-error, warn-about-load-error, read/eval): Add clause for SRFI-34 exceptions.
2015-05-26ui: Improve error reporting for 'read/eval'.Ludovic Courtès
The effect is visible on commands like: guix build -e '(+ 2 "foo")' guix build -e '()' * guix/ui.scm (read/eval): Change handler to properly report syntax errors and use 'display-error' for other errors.
2015-05-25guix system: Add '--on-error'.Ludovic Courtès
* 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.
2015-05-25ui: Auto-compile user code, and improve error reporting.Ludovic Courtès
Reported by Christian Grothoff. * guix/ui.scm (load*): Add 'frame-with-source'. Set %load-should-auto-compile. Change error handle to just (exit 1). Add pre-unwind handler to capture the stack and call 'report-load-error'. (report-load-error): Add optional 'frame' parameter and pass it to 'display-error'. * tests/guix-system.sh: Add "unbound variable" test.
2015-05-24ui: Make 'symlink' replacement more future-proof.Ludovic Courtès
* guix/ui.scm (symlink): Change next-to-last 'throw' argument to explicitly ignore ARGS; change last argument to (list errno).
2015-05-24ui: Add 'copy-file' replacement with better error reporting.Ludovic Courtès
* guix/ui.scm (copy-file): New procedure.
2015-05-21ui: Deduplicate 'show-what-to-build*'.David Thompson
* 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.
2015-05-20ui: Factorize user-provided Scheme file loading.David Thompson
* 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*'.
2015-05-10Remove assorted Guile 2.0.5 workarounds.Ludovic Courtès
* 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.
2015-04-20ui: Add 'symlink' replacement with better error reporting.Ludovic Courtès
* guix/ui.scm (symlink): New procedure.
2015-04-19guix package: -A and -s take supported systems into account.Ludovic Courtès
* guix/scripts/package.scm (guix-package)[process-query] <list-available>: Restrict results to packages matching 'supported-package?". * guix/ui.scm (package->recutils): Print "systems:". * tests/guix-package.sh: Add tests. * doc/guix.texi (Invoking guix package): Adjust description of '--list-available' accordingly.
2015-04-08Merge branch 'master' into core-updates宋文武
2015-04-07gnu: Emit a warning when a package module cannot be loaded.Ludovic Courtès
* guix/ui.scm (warn-about-load-error): New procedure. * gnu/packages.scm (package-modules): Wrap 'resolve-interface' call in 'catch #t', and call 'warn-about-load-error' in handler.
2015-04-07ui: Add 'report-load-error'.Ludovic Courtès
* guix/scripts/system.scm (read-operating-system): Replace error handling code by a call to 'report-load-error'. * guix/ui.scm (report-load-error): New procedure.
2015-04-03ui: Recognize 'guix help'.Ludovic Courtès
Suggested by Andy Wingo. * guix/ui.scm (guix-main): Add "help" case.
2015-03-25Rename 'guix substitute-binary' to 'guix substitute'.Ludovic Courtès
* guix/scripts/substitute-binary.scm: Rename to... * guix/scripts/substitute.scm: ... this. Adjust module name, entry point, comments, and help string accordingly. * nix/scripts/substitute-binary.in: Rename to... * nix/scripts/substitute.in: ... this. * pre-inst-env.in (NIX_SUBSTITUTERS): Adjust accordingly. * tests/substitute-binary.scm: Rename to... * tests/substitute.scm: ... this. Adjust references to (guix scripts substitute) accordingly. * guix/ui.scm (show-guix-help)[internal?]: Change "substitute-binary" to "substitute". * Makefile.am (MODULES, SCM_TESTS): Adjust to file renames. * daemon.am (nodist_pkglibexec_SCRIPTS): Likewise. * config-daemon.ac: Likewise. * guix/tests.scm (call-with-derivation-narinfo): Adjust comments and docstring.
2015-02-26ui: Add missing copyright line.Ludovic Courtès
* guix/ui.scm: Add copyright line for Deck (aka. nebuli).
2015-02-26ui: Honor --no-* options passed via $GUIX_BUILD_OPTIONS.Ludovic Courtès
Reported by Alex Kost <alezost@gmail.com> at <http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00702.html>. * guix/ui.scm (parse-command-line)[parse-options-from]: Add 'seeds' parameter. Thread the result of the first 'parse-options-from' call to the second.
2015-02-26ui: Factorize command-line + env. var. option parsing.Ludovic Courtès
* guix/ui.scm (%default-argument-handler, parse-command-line): New procedures. (environment-build-options): Make private. * guix/scripts/archive.scm (guix-archive)[parse-options, parse-options-from]: Remove. Use 'parse-command-line' instead. * guix/scripts/build.scm (guix-build): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/package.scm (guix-package): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * tests/ui.scm (with-environment-variable): New macro. ("parse-command-line"): New test.
2015-02-08profiles: Distinguish downgrades from upgrades.Ludovic Courtès
Fixes <http://bugs.gnu.org/19764>. * guix/profiles.scm (manifest-transaction-effects): Return downgraded packages as a fourth value. * guix/ui.scm (show-manifest-transaction): Adjust accordingly. * tests/profiles.scm ("manifest-transaction-effects and downgrades"): New test.
2015-02-08ui: Properly report '&nar-error' conditions.Ludovic Courtès
This is a followup to 46b8aad. * guix/ui.scm (call-with-error-handling): Add 'nar-error?' case.
2015-01-28ui: Update copyright year in '--version' output.Ludovic Courtès
* guix/ui.scm (show-version-and-exit): Increment copyright year.
2015-01-24derivations: Raise an error for references to non-existent outputs.Ludovic Courtès
Fixes <http://bugs.gnu.org/19630>. Reported by Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>. * guix/derivations.scm (&derivation-error, &derivation-missing-output-error): New error conditions. (derivation->output-path): Raise a '&derivation-missing-output-error' if OUTPUT is not an output of DRV. * guix/ui.scm (call-with-error-handling): Add case for 'derivation-missing-output-error?'. (show-what-to-build): Check whether (derivation-outputs drv) is empty. * tests/packages.scm ("reference to non-existent output"): Add test.
2015-01-22guix system: Improve error messages.Ludovic Courtès
* guix/ui.scm (report-error): Export. * guix/scripts/system.scm (read-operating-system): Report syntax errors using standard GNU format. Report other errors using 'display-error'.
2015-01-10derivations: Add 'substitution-oracle' and use it.Ludovic Courtès
This makes 'guix environment PACKAGE' significantly faster when substitutes are enabled. Before that, it would lead to many invocations of 'guix substitute-binary', one per 'derivation-prerequisites-to-build' call. Now, all these are replaced by a single invocation. * guix/derivations.scm (derivation-output-paths, substitution-oracle): New procedures. (derivation-prerequisites-to-build): Replace #:use-substitutes? with #:substitutable?. Remove the local 'derivation-output-paths' and 'substitutable?'. * guix/ui.scm (show-what-to-build): Add 'substitutable?'. Pass it to 'derivation-prerequisites-to-build'. [built-or-substitutable?]: Use it instead of 'has-substitutes?'. * tests/derivations.scm ("derivation-prerequisites-to-build and substitutes"): Use #:substitutable? instead of #:use-substitutes?.
2014-11-30guix: scripts: Add GUIX_BUILD_OPTIONS environment handling.nebuli
* doc/guix.texi (Invoking guix build): Mention 'GUIX_BUILD_OPTIONS'. * guix/scripts/archive.scm: (append args (environment-build-options)). * guix/scripts/build.scm: Ditto. * guix/scripts/environment.scm: Ditto. * guix/scripts/package.scm: Ditto. * guix/scripts/system.scm: Ditto. * guix/ui.scm (environment-build-options): New function. * guix/utils.scm (arguments-from-environment-variable): New function. * tests/guix-build.sh: Add tests. * test-env.in: Unset GUIX_BUILD_OPTIONS. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2014-10-12profiles: Add condition types for profiles and generations.Alex Kost
Suggested by Ludovic Courtès. * guix/profiles.scm (&profile-error, &profile-not-found-error, &missing-generation-error): New condition types. * guix/ui.scm (call-with-error-handling): Handle new types. * guix/scripts/package.scm (roll-back, guix-package): Raise '&profile-not-found-error' where needed.
2014-10-10ui: Move 'show-manifest-transaction' from (guix profiles).Alex Kost
* guix/profiles.scm: Do not use (guix ui) module. (right-arrow, manifest-show-transaction): Move and rename to... * guix/ui.scm (right-arrow, show-manifest-transaction): ... here. * tests/profiles.scm ("manifest-show-transaction"): Move to... * tests/ui.scm ("show-manifest-transaction"): ... here. (guile-1.8.8, guile-2.0.9): New variables. * emacs/guix-main.scm (process-package-actions): Rename 'manifest-show-transaction' to 'show-manifest-transaction'. * guix/scripts/package.scm (guix-package): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-10-09ui: Make sure we use the right domain for &message translation.Ludovic Courtès
* guix/ui.scm (call-with-error-handling): Add %GETTEXT-DOMAIN as a second argument to 'gettext'.
2014-10-03ui: Recognize the same size units as Coreutils.Ludovic Courtès
* guix/ui.scm (size->number): Add a bunch of large units. Recognize one-letter unit names. Change "KB" to "kB". * tests/ui.scm ("size->number, 1T"): New test. * doc/guix.texi (Invoking guix gc): Add cross-reference to "Block size" in the Coreutils manual. (Invoking guix system): Likewise.
2014-09-14pull: Create ~/.config/guix if needed instead of bailing out gracelessly.Ludovic Courtès
Previously 'guix pull' would just fail with "No such file or directory" if ~/.config didn't already exist. * guix/ui.scm (config-directory): Use 'mkdir-p' instead of 'mkdir'. Change the 'catch' handler to expect errors different from EEXIST.
2014-08-11ui: Fix handling of periods by fill-paragraph.Cyrill Schenkel
Fixes <http://bugs.gnu.org/17468>. * guix/ui.scm (fill-paragraph): Two spaces after period and no spaces before newline. * tests/ui.scm: New test case. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-07-25guix: package: Fix recutils output for non-package inputs.Eric Bavier
* guix/ui.scm (package->recutils)[dependencies]: Ignore non-package inputs. * tests/guix-package.sh: New test.
2014-07-25ui: Improve formatting of package dependencies in recutils.Ludovic Courtès
* guix/ui.scm (package->recutils)[dependencies->recutils]: New procedure. Use it.
2014-07-21ui: add the "dependencies" field to package->recutils:Cyril Roelandt
* guix/ui.scm (package->recutils): Print the dependencies of the package.
2014-06-14ui: Avoid circularity with (guix gexp).Ludovic Courtès
Fixes a regression introduced in 56b8210 ("guix build: Allow gexps to be passed to '-e'.") * guix/ui.scm (%guix-user-module): Wrap in 'delay'. (read/eval): Adjust accordingly.
2014-06-14guix build: Allow gexps to be passed to '-e'.Ludovic Courtès
* guix/ui.scm (%guix-user-module): New variable. (read/eval): Pass it as the second argument to 'eval'. * guix/scripts/build.scm (options/resolve-packages): Add case for 'gexp?'. * tests/guix-build.sh: Add tests. * doc/guix.texi (Invoking guix build): Document '-e gexp'. guxi build: Allow gexps to be passed to '-e'. * guix/ui.scm (%guix-user-module): New variable. (read/eval): Pass it as the second argument to 'eval'. * guix/scripts/build.scm (options/resolve-packages): Add case for 'gexp?'. * tests/guix-build.sh: Add tests. * doc/guix.texi (Invoking guix build): Document '-e gexp'.
2014-06-13Separate package description translations from string translations.Ludovic Courtès
* po/packages/LINGUAS, po/packages/Makevars, po/packages/POTFILES.in: New files. * po/guix/Makevars (DOMAIN): Change to "guix". (XGETTEXT_OPTIONS): Remove "--keyword=synopsis --keyword=description". * po/guix/POTFILES.in: Remove gnu/packages/*.scm. * configure.ac: Change to gettext 0.18.3. Produce po/packages/Makefile.in. * Makefile.am (SUBDIRS): Add po/packages. * guix/ui.scm (%package-text-domain): New variable. (P_): New procedure. (package->recutils): Use 'P_' instead of '_'. * guix/scripts/package.scm (find-packages-by-description): Use 'P_' instead of 'gettext'.
2014-05-19ui: Gracefully deal with zero-output derivations.Ludovic Courtès
* guix/ui.scm (show-what-to-build)[built-or-substitutable?]: New procedure. Check whether OUT is #f. Use it. * tests/ui.scm ("show-what-to-build, zero outputs"): New test.