summaryrefslogtreecommitdiff
path: root/guix/ui.scm
Commit message (Collapse)AuthorAge
* ui: Move macro definitions before any use.Ludovic Courtès2013-04-22
| | | | | | * guix/ui.scm (define-diagnostic, warning, report-error, leave): Move definitions before any use. Reported by Nikita Karetnikov. (install-locale): Move back close to `initialize-guix'.
* Factorize `download-and-store'.Ludovic Courtès2013-04-21
| | | | | | | | * guix/download.scm (download-to-store): New procedure. * guix/scripts/download.scm (fetch-and-store): Remove. (guix-download): Use `download-to-store' instead. * guix/ui.scm (call-with-temporary-output-file): Move to... * guix/utils.scm (call-with-temporary-output-file): ... here.
* ui: Move definition of `install-locale' after that of the `warning' macro.Ludovic Courtès2013-04-21
| | | | * guix/ui.scm (install-locale): Move definition after that of `warning'.
* ui: Add a 'define-diagnostic' macro.Nikita Karetnikov2013-04-21
| | | | | | | | | | | | | | | | | * guix/ui.scm (define-diagnostic): New macro, which is based on the previous version of 'warning'. (warning, leave): Redefine using 'define-diagnostic'. (report-error): New macro. (install-locale): Use 'warning' instead of 'format'. (call-with-error-handling): Adjust 'leave'. * gnu/packages.scm (package-files): Use 'warning' instead of 'format'. * guix/gnu-maintenance.scm (http-fetch): Use 'warning' and 'leave'. * guix/scripts/build.scm (derivations-from-package-expressions, guix-build): Adjust 'leave'. * guix/scripts/download.scm (guix-download): Adjust 'leave'. * guix/scripts/gc.scm (size->number, %options): Adjust 'leave'. * guix/scripts/package.scm (roll-back, guix-package): Adjust 'leave'. * po/POTFILES.in: Add 'guix/gnu-maintenance.scm'.
* ui: Fix format string in `warning'.Ludovic Courtès2013-04-17
| | | | * guix/ui.scm (warning)[augmented-format-string]: Add missing ~*.
* scripts: Report what will be substituted.Ludovic Courtès2013-04-17
| | | | | | | | | | | | | | | | * guix/derivations.scm (derivation-input-output-paths): New procedure. (derivation-prerequisites-to-build): New `use-substitutes?' keyword argument. Change two return the list of substitutable paths as a second argument. * guix/ui.scm (show-what-to-build): Turn `dry-run?' into a keyword argument. New `use-substitutes?' keyword argument. Use `fold2' and adjust to use both return values of `derivation-prerequisites-to-build'. Display what will/would be downloaded. * guix/scripts/build.scm (guix-build): Adjust accordingly. * guix/scripts/package.scm (guix-package): Likewise. * tests/derivations.scm ("derivation-prerequisites-to-build and substitutes"): New test.
* ui: Add a `warning' macro.Ludovic Courtès2013-04-11
| | | | | | | | | * guix/ui.scm (program-name, guix-warning-port): New variables. (warning): New macro. (guix-main): Parametrize PROGRAM-NAME. * guix/scripts/build.scm, guix/scripts/download.scm, guix/scripts/gc.scm, guix/scripts/package.scm: Adjust to use `leave' and `warning' consistently.
* ui: Gracefully report failures to connect to the daemon.Ludovic Courtès2013-03-07
| | | | | | | | | | | | * guix/store.scm (&nix-connection-error): New condition type. (open-connection): Translate `system-error' during the `connect' call into `&nix-connection-error'. * guix/ui.scm (call-with-error-handling): Add case for `nix-connection-error?'. * guix/scripts/package.scm (guix-package): Move `open-connection' call within `with-error-handling'. * guix/scripts/pull.scm (guix-pull): Likewise. * guix/scripts/download.scm (guix-download): Move body within `with-error-handling'.
* ui: Factorize `read/eval-package-expression'.Ludovic Courtès2013-03-01
| | | | | | * guix/scripts/package.scm (read/eval-package-expression): Move to... * guix/ui.scm (read/eval-package-expression): ... here. * guix/scripts/build.scm (derivations-from-package-expressions): Use it.
* pull: Distinguish "already up to date" from "updated".Ludovic Courtès2013-02-22
| | | | | | * guix/ui.scm (show-what-to-build): Return (length req*). * guix/scripts/pull.scm (guix-pull): Print an "already up to date" message when there's nothing to build.
* Add "guix pull".Ludovic Courtès2013-02-20
| | | | | | | | | | | * guix/scripts/pull.scm: New file. * Makefile.am (MODULES): Add it. * doc/guix.texi (Invoking guix pull): New node. (Invoking guix package): Add cross-ref to it. * guix/ui.scm (config-directory): New procedure. * scripts/guix.in: When `GUIX_UNINSTALLED' is undefined, add $XDG_CONFIG_HOME/guix/latest to the search path. * po/POTFILES.in: Add guix/scripts/pull.scm.
* ui: Factorize `show-what-to-build'.Ludovic Courtès2013-02-20
| | | | | | | | * guix/scripts/package.scm (guix-package)[show-what-to-build]: Move to.. * guix/ui.scm (show-what-to-build): ... here. Add a `store' parameter'. Adjust callers. * guix/scripts/build.scm (guix-build): Use it. Remove `req' and `req*' variables.
* ui: Add temporary file handling and atomic symlink switch.Ludovic Courtès2013-02-20
| | | | | | | | * guix/scripts/download.scm (call-with-temporary-output-file): Move to ui.scm. * guix/scripts/package.scm (switch-symlinks): Likewise. * guix/ui.scm (call-with-temporary-output-file, switch-symlinks): New procedures.
* scripts: Remove initialization now redundant with `initialize-guix'.Ludovic Courtès2013-02-17
| | | | | | | | | | * guix/scripts/build.scm (guix-build): Remove calls to `install-locale', `textdomain', etc., now redundant with `initialize-guix'. * guix/scripts/download.scm (guix-download): Likewise. * guix/scripts/import.scm (guix-import): Likewise. * guix/scripts/package.scm (guix-package): Likewise. * guix/ui.scm: Remove export of `install-locale' and `initialize-guix'. (initialize-guix): Add docstring.
* Replace individual scripts with master 'guix' script.Mark H Weaver2013-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scripts/guix.in: New script. * Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build', 'guix-download', 'guix-import', 'guix-package', and 'guix-gc'. (MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm', 'guix/scripts/import.scm', 'guix/scripts/package.scm', and 'guix/scripts/gc.scm'. * configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build', 'guix-download', 'guix-import', 'guix-package', and 'guix-gc'. * guix-build.in, guix-download.in, guix-gc.in, guix-import.in, guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to (guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in usage help string. * pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH. Export $GUIX_UNINSTALLED. * tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of "guix-COMMAND". * doc/guix.texi: Replace all occurrences of "guix-COMMAND" with "guix COMMAND". * po/POTFILES.in: Update.
* guix-package: Report `--search' matches in recutils format.Ludovic Courtès2013-02-01
| | | | | | | | | | | | * guix/ui.scm (fill-paragraph, string->recutils, package->recutils): New procedures. * guix-package.in (guix-package)[process-query]: Use `package->recutils' to display package meta-data. * tests/guix-package.sh: Adjust test. * tests/ui.scm: New file. * Makefile.am (TESTS): Add it. * doc/guix.texi (Invoking guix-package): Adjust `--search' documentation, and give an example.
* Gracefully handle failure to install the current locale.Ludovic Courtès2013-01-30
| | | | | | * guix/ui.scm (install-locale): New procedure. * guix-build.in, guix-download.in, guix-gc.in, guix-import.in, guix-package.in: Use it instead of (setlocale LC_ALL "").
* Update license headers.Ludovic Courtès2013-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change all license headers, except guix/build/* and ld-wrapper.scm, with this code: (use-modules (guix build utils) (srfi srfi-1)) (fluid-set! %default-port-encoding "UTF-8") (substitute* (remove (lambda (f) (or (string-contains f ".tar.") (string-contains f ".git/") (string-contains f ".so") (string-suffix? ".o" f) (string-suffix? ".a" f) (string-suffix? ".go" f) (string-suffix? ".pdf" f) (string-suffix? ".png" f) (string-suffix? ".info" f) (equal? (basename f) "guix-daemon") (equal? (basename f) "nix-setuid-helper") (string-contains f "nix-upstream/") (string-contains f "distro/packages/bootstrap/"))) (find-files "." "\\.[a-z]+$")) (("^([[:graph:]]+) This file is part of Guix." _ comment-start) (string-append comment-start " This file is part of GNU Guix.")) (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start) (string-append comment-start " GNU Guix --- Functional package management for GNU\n")) (("^([[:graph:]]+) Guix is " _ comment-start) (string-append comment-start " GNU Guix is ")) (("^([[:graph:]]+) along with Guix." _ comment-start) (string-append comment-start " along with GNU Guix.")) (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start) (string-append comment-start " Copyright ©"))) Change headers using C-style comments manually.
* ui: Factorize bug-report information in `--help'.Ludovic Courtès2013-01-05
| | | | | | | | | * guix/config.scm.in (%guix-home-page-url): New variable. * guix/ui.scm (show-bug-report-information): New procedure. * guix-build.in (show-help): Use it. * guix-download.in (show-help): Likewise. * guix-import.in (show-help): Likewise. * guix-package.in (show-help): Likewise.
* guix-package: Add `--list-available'.Ludovic Courtès2012-11-19
| | | | | | | | | | * guix-package.in (show-help, %options): Add `--list-available'. (guix-package)[process-query]: Add support for `--list-available'. * doc/guix.texi (Invoking guix-package): Document it. * tests/guix-package.sh: Add test. * guix/ui.scm (location->string): New procedure. * guix/utils.scm: Export <location>.
* ui: Factorize `--version'.Ludovic Courtès2012-11-03
| | | | | | | | * guix/ui.scm (show-version-and-exit): New procedure. * guix-build.in (show-version): Remove. (%options)["version"]: Use `show-version-and-exit'. * guix-download.in: Likewise. * guix-package.in: Likewise.
* Add (guix ui).Ludovic Courtès2012-11-01
* guix/ui.scm: New file. * Makefile.am (MODULES): Add it. * po/POTFILES.in: Add it. * guix-build.in: Use it. (_, N_, leave): Remove. (guix-build): Use `with-error-handling' instead of the `guard' form. * guix-download.in: Use it. (_, N_, leave): Remove.