summaryrefslogtreecommitdiff
path: root/guix/ui.scm
Commit message (Collapse)AuthorAge
* ui: Add 'symlink' replacement with better error reporting.Ludovic Courtès2015-04-20
| | | | * guix/ui.scm (symlink): New procedure.
* guix package: -A and -s take supported systems into account.Ludovic Courtès2015-04-19
| | | | | | | | | | * 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.
* Merge branch 'master' into core-updates宋文武2015-04-08
|\
| * ui: Recognize 'guix help'.Ludovic Courtès2015-04-03
| | | | | | | | | | | | Suggested by Andy Wingo. * guix/ui.scm (guix-main): Add "help" case.
* | gnu: Emit a warning when a package module cannot be loaded.Ludovic Courtès2015-04-07
| | | | | | | | | | | | * 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.
* | ui: Add 'report-load-error'.Ludovic Courtès2015-04-07
|/ | | | | | * 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.
* Rename 'guix substitute-binary' to 'guix substitute'.Ludovic Courtès2015-03-25
| | | | | | | | | | | | | | | | | | | * 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.
* ui: Add missing copyright line.Ludovic Courtès2015-02-26
| | | | * guix/ui.scm: Add copyright line for Deck (aka. nebuli).
* ui: Honor --no-* options passed via $GUIX_BUILD_OPTIONS.Ludovic Courtès2015-02-26
| | | | | | | | | | 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.
* ui: Factorize command-line + env. var. option parsing.Ludovic Courtès2015-02-26
| | | | | | | | | | | | | | * 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.
* profiles: Distinguish downgrades from upgrades.Ludovic Courtès2015-02-08
| | | | | | | | | | 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.
* ui: Properly report '&nar-error' conditions.Ludovic Courtès2015-02-08
| | | | | | This is a followup to 46b8aad. * guix/ui.scm (call-with-error-handling): Add 'nar-error?' case.
* ui: Update copyright year in '--version' output.Ludovic Courtès2015-01-28
| | | | * guix/ui.scm (show-version-and-exit): Increment copyright year.
* derivations: Raise an error for references to non-existent outputs.Ludovic Courtès2015-01-24
| | | | | | | | | | | | | | | 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.
* guix system: Improve error messages.Ludovic Courtès2015-01-22
| | | | | | * 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'.
* derivations: Add 'substitution-oracle' and use it.Ludovic Courtès2015-01-10
| | | | | | | | | | | | | | | | | | 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?.
* guix: scripts: Add GUIX_BUILD_OPTIONS environment handling.nebuli2014-11-30
| | | | | | | | | | | | | | | * 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>
* profiles: Add condition types for profiles and generations.Alex Kost2014-10-12
| | | | | | | | | | 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.
* ui: Move 'show-manifest-transaction' from (guix profiles).Alex Kost2014-10-10
| | | | | | | | | | | | | | * 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>
* ui: Make sure we use the right domain for &message translation.Ludovic Courtès2014-10-09
| | | | | * guix/ui.scm (call-with-error-handling): Add %GETTEXT-DOMAIN as a second argument to 'gettext'.
* ui: Recognize the same size units as Coreutils.Ludovic Courtès2014-10-03
| | | | | | | | | * 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.
* pull: Create ~/.config/guix if needed instead of bailing out gracelessly.Ludovic Courtès2014-09-14
| | | | | | | | 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.
* ui: Fix handling of periods by fill-paragraph.Cyrill Schenkel2014-08-11
| | | | | | | | | 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>
* guix: package: Fix recutils output for non-package inputs.Eric Bavier2014-07-25
| | | | | * guix/ui.scm (package->recutils)[dependencies]: Ignore non-package inputs. * tests/guix-package.sh: New test.
* ui: Improve formatting of package dependencies in recutils.Ludovic Courtès2014-07-25
| | | | | * guix/ui.scm (package->recutils)[dependencies->recutils]: New procedure. Use it.
* ui: add the "dependencies" field to package->recutils:Cyril Roelandt2014-07-21
| | | | * guix/ui.scm (package->recutils): Print the dependencies of the package.
* ui: Avoid circularity with (guix gexp).Ludovic Courtès2014-06-14
| | | | | | | | 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.
* guix build: Allow gexps to be passed to '-e'.Ludovic Courtès2014-06-14
| | | | | | | | | | | | | | | | | * 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'.
* Separate package description translations from string translations.Ludovic Courtès2014-06-13
| | | | | | | | | | | | | | | | * 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'.
* ui: Gracefully deal with zero-output derivations.Ludovic Courtès2014-05-19
| | | | | | | * 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.
* monads: Hide 'derivation-expression' and 'lower-inputs'.Ludovic Courtès2014-04-28
| | | | | | | | | | | | | | | | | * guix/monads.scm: Unexport 'lower-inputs' and 'derivation-expression'. (text-file*): Add comment about the switch to 'gexp->derivation'. (lower-inputs): Add comment about its doom. (derivation-expression): Likewise. * guix/gexp.scm (lower-inputs*): Rename to... (lower-inputs): ... this. Update callers. * tests/monads.scm (derivation-expression): New procedure. * doc/guix.texi (The Store Monad): Use 'gexp->derivation' instead of 'derivation-expression'. Remove documentation of 'derivation-expression'. * guix/ui.scm (read/eval): Use THE-ROOT-MODULE so that macros are properly expanded. * tests/guix-build.sh: Use 'gexp->derivation' instead of 'derivation-expression'.monads: Hide 'derivation-expression' and 'lower-inputs'.
* ui: Add 'size->number'.Ludovic Courtès2014-04-08
| | | | | | | | * guix/scripts/gc.scm (size->number): Remove. * guix/ui.scm (size->number): New procedure. * tests/ui.scm ("size->number, bytes", "size->number, MiB", "size->number, GiB", "size->number, 1.2GiB", "size->number, invalid unit"): New tests.
* ui: Improve reporting of 'system-error' exceptions.Ludovic Courtès2014-04-04
| | | | | * guix/ui.scm (call-with-error-handling): Change 'system-error' handler to display the error message as it was raised.
* ui: Handle SRFI-35 '&message' conditions.Ludovic Courtès2014-02-21
| | | | | | * guix/ui.scm (call-with-error-handling): Add case for 'message-condition?'. * po/Makevars: Fix typo in comment.
* Add 'guix offload' as a daemon build hook.Ludovic Courtès2014-01-24
| | | | | | | | | | | | | | | | | | | | | | | | * nix/nix-daemon/guix-daemon.cc (GUIX_OPT_NO_BUILD_HOOK): New macro. (options): Add '--no-build-hook'. (parse_opt): Handle it. (main)[HAVE_DAEMON_OFFLOAD_HOOK]: Set 'useBuildHook' by default. Set $NIX_BUILD_HOOK to our offload hook unless otherwise specified. [!HAVE_DAEMON_OFFLOAD_HOOK]: Clear 'useBuildHook'. * pre-inst-env.in: Set and export NIX_BUILD_HOOK. * nix/scripts/offload.in, guix/scripts/offload.scm: New files. * guix/ui.scm (show-guix-help)[internal?]: Add "offload". * config-daemon.ac: Call 'GUIX_CHECK_UNBUFFERED_CBIP'. Instantiate 'nix/scripts/offload'. Set 'BUILD_DAEMON_OFFLOAD' conditional, and optionally define 'HAVE_DEAMON_OFFLOAD_HOOK' cpp macro. * daemon.am (nodist_pkglibexec_SCRIPTS)[BUILD_DAEMON_OFFLOAD]: Add it. * Makefile.am (MODULES)[BUILD_DAEMON_OFFLOAD]: Add 'guix/scripts/offload.scm'. (EXTRA_DIST)[!BUILD_DAEMON_OFFLOAD]: Likewise. * m4/guix.m4 (GUIX_CHECK_UNBUFFERED_CBIP): New macro. * doc/guix.texi (Setting Up the Daemon): Move most of the body to... (Build Environment Setup): ... this. New subsection. (Daemon Offload Setup): New subsection.
* ui: Filter out internal commands from '--help'.Ludovic Courtès2014-01-24
| | | | | * guix/ui.scm (show-guix-help)[internal?]: New procedure. Use it to filter out internal commands reported by '--help'.
* ui: Update copyright year in '--version' output.Ludovic Courtès2014-01-17
| | | | * guix/ui.scm (show-version-and-exit): Increment copyright year.
* ui: Don't use hyphens in 'package->recutils' output.Ludovic Courtès2014-01-13
| | | | | * guix/ui.scm (package->recutils): Rename recutils field from 'home-page' to 'homepage'.
* guix build: '-e' can be passed a monadic thunk.Ludovic Courtès2013-11-18
| | | | | | | | | | | | * guix/ui.scm (read/eval): New procedure. (read/eval-package-expression): Use it. * guix/scripts/build.scm (derivations-from-package-expressions): Rename to... (derivation-from-expression): ... this. Accept procedures, under the assumption that they are monadic thunk. (show-help): Adjust accordingly. (guix-build): Ditto. * tests/guix-build.sh: Add test. * doc/guix.texi (Invoking guix build): Augment description of '-e'.
* ui: Make '--version' output GCS-compliant.Ludovic Courtès2013-11-03
| | | | | * guix/ui.scm (show-version-and-exit): Display copyright year, license, and LACK OF WARRANTY.
* ui: Factorize package specification parsing.Ludovic Courtès2013-11-01
| | | | | | | * guix/ui.scm (package-specification->name+version+output): New procedure. * guix/scripts/package.scm (specification->package+output): Use it. * tests/ui.scm ("package-specification->name+version+output"): New test.
* guix: Add missing call to 'bindtextdomain'.Ludovic Courtès2013-10-12
| | | | | | | * scripts/guix.in (config-lookup): Add "localedir" entry. (run-guix-main): Add call to 'bindtextdomain'. * guix/ui.scm (initialize-guix): Use %GETTEXT-DOMAIN instead of a literal.
* guix package: Add '--list-generations'.Nikita Karetnikov2013-09-19
| | | | | | | | | | | | | | * guix/scripts/package.scm: Import (srfi srfi-19). (generation-time, matching-generations): New functions. (show-help): Add '--list-generations'. (%options): Likewise. (guix-package)[process-query]: Add support for '--list-generations'. * guix/ui.scm: Import (srfi srfi-19) and (ice-9 regex). (string->generations, string->duration): New functions. * tests/guix-package.sh: Test '--list-generations'. * tests/ui.scm: Import (srfi srfi-19). Test 'string->generations' and 'string->duration'. * doc/guix.texi (Invoking guix-package): Document '--list-generations'.
* derivations: 'derivation' and related procedures return a single value.Ludovic Courtès2013-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/derivations.scm (derivation->output-path, derivation->output-paths): New procedures. (derivation-path->output-path): Use 'derivation->output-path'. (derivation-path->output-paths): Use 'derivation->output-paths'. (derivation): Accept 'derivation?' objects as inputs. Return a single value. (build-derivations): New procedure. (compiled-modules): Use 'derivation->output-paths'. (build-expression->derivation)[source-path]: Add case for when the input matches 'derivation?'. [prologue]: Accept 'derivation?' objects in INPUTS. [mod-dir, go-dir]: Use 'derivation->output-path'. * guix/download.scm (url-fetch): Adjust to the single-value return. * guix/packages.scm (package-output): Use 'derivation->output-path'. * guix/scripts/build.scm (guix-build): When the argument is 'derivation-path?', pass it through 'read-derivation'. Use 'derivation-file-name' to print out the .drv file names, and to register them. Use 'derivation->output-path' instead of 'derivation-path->output-path'. * guix/scripts/package.scm (roll-back): Adjust to the single-value return. (guix-package): Use 'derivation->output-path'. * guix/ui.scm (show-what-to-build): Adjust to deal with 'derivation?' objects instead of .drv file names. * gnu/system/grub.scm (grub-configuration-file): Use 'derivation->output-path' instead of 'derivation-path->output-path'. * gnu/system/vm.scm (qemu-image, system-qemu-image): Likewise. * tests/builders.scm, tests/derivations.scm, tests/packages.scm, tests/store.scm, tests/union.scm: Adjust to the new calling convention. * doc/guix.texi (Defining Packages, The Store, Derivations): Adjust accordingly.
* substitute-binary: Show the Nar size, when available.Ludovic Courtès2013-09-02
| | | | | | * guix/scripts/substitute-binary.scm (guix-substitute-binary)["--substitute"]: Show the Nar size, when available. * guix/ui.scm (show-what-to-build): Add 'TODO'.
* Make "guix -h" work as "guix --help".Cyril Roelandt2013-08-15
| | | | | * guix/ui.scm (guix-main): have the same behaviour for the "-h" and "--help" options.
* ui: Ignore SIGPIPE and catch `system-error' exceptions.Ludovic Courtès2013-07-12
| | | | | * guix/ui.scm (initialize-guix): Call `sigaction'. (call-with-error-handling): Wrap `thunk' in a (catch 'system-error ...).
* ui: Don't make substituter-related RPCs at all when substitutes are disabled.Ludovic Courtès2013-07-01
| | | | | | | Reported by Nikita Karetnikov and Cyril Roelandt. * guix/ui.scm (show-what-to-build): Call `substitutable-path-info' only when USE-SUBSTITUTES? is true.
* ui: define-diagnostic: Don't mark `_' and `N_' as literals.Ludovic Courtès2013-05-30
| | | | | | * guix/ui.scm (define-diagnostic): Use `free-identifier=?' to compare the user's input with `_' and `N-". This should fix builds with Guile 2.1. Reported by Cojocaru Alexandru <xojoc@gmx.com>.
* packages: Raise an error condition a cross builder is needed but unavailable.Ludovic Courtès2013-05-27
| | | | | | | | | * guix/packages.scm (&package-cross-build-system-error): New condition type. (package-cross-derivation): Raise &package-cross-build-system-error when the build system doesn't support cross builds. * guix/ui.scm (call-with-error-handling): Add package-cross-build-system-error? case. * tests/packages.scm ("package-cross-derivation, no cross builder"): New test.