summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* guix lint: Make the 'source' checker happy if at least one URI is valid.Ludovic Courtès2015-01-26
| | | | | | | | Before that it would check all the URIs of each package. * guix/scripts/lint.scm (validate-uri): Really return #f on failure and #t otherwise. (check-source): Replace 'for-each' with 'any'.
* lint: add 'source' checker.Cyril Roelandt2015-01-25
| | | | | * guix/scripts/lint.scm (validate-uri?): New procedure. (%checkers): Add 'source' checker
* 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'.
* guix package: Avoid spurious warnings from 'find-files'.Ludovic Courtès2015-01-20
| | | | | | | | Reported by Andreas Enge <andreas@enge.fr>. * guix/scripts/package.scm (with-null-error-port): New macro. (search-path-environment-variables): Wrap 'search-path-as-list' call in 'with-null-error-port'.
* guix archive: Add -r/--recursive.Ludovic Courtès2015-01-17
| | | | | | | * guix/scripts/archive.scm (show-help, %options): Add -r/--recursive. (export-from-store): Pass #:recursive? to 'export-paths'. * doc/guix.texi (Invoking guix archive): Add -r in Emacs example. Add example with ~/.guix-profile. Document -r/--recursive.
* guix archive: Remove unused -r/--root option.Ludovic Courtès2015-01-17
| | | | * guix/scripts/archive.scm (%options): Remove -r/--root.
* Merge branch 'core-updates'Ludovic Courtès2015-01-16
|\ | | | | | | | | Conflicts: gnu/packages/bootstrap.scm
| * Merge branch 'master' into core-updatesMark H Weaver2015-01-11
| |\
| * | guix package: Follow symlinks for pattern search paths.Ludovic Courtès2015-01-03
| | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (search-path-environment-variables): Add local 'files' variable. * tests/packages.scm ("--search-paths with pattern"): New test.
| * | Merge branch 'master' into core-updatesMark H Weaver2014-12-30
| |\ \
| * | | guix package: Use 'search-path-as-list' instead of custom code.Ludovic Courtès2014-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This will handle the new 'file-type' and 'file-pattern' fields correctly. * guix/scripts/package.scm (search-path-environment-variables)[search-path-definition]: Rewrite in terms of 'search-path-as-list'.
| * | | utils: Export 'search-path-as-list'.Ludovic Courtès2014-12-27
| | | | | | | | | | | | | | | | | | | | * guix/build/utils.scm (search-path-as-list): Make public. * guix/scripts/environment.scm (for-each-search-path): Use it.
| * | | packages: Add 'file-type' field to 'search-path-specification'.Ludovic Courtès2014-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/18033>. * guix/packages.scm (<search-path-specification>): Rename 'directories' field to 'files'. Add 'file-type'. (search-path-specification->sexp): Honor 'file-type'. * gnu/packages/autotools.scm, gnu/packages/bootstrap.scm, gnu/packages/cross-base.scm, gnu/packages/games.scm, gnu/packages/gcc.scm, gnu/packages/glib.scm, gnu/packages/guile.scm, gnu/packages/man.scm, gnu/packages/perl.scm, gnu/packages/pkg-config.scm, gnu/packages/python.scm, gnu/packages/ruby.scm, gnu/packages/xfce.scm: Change 'directories' to 'files'. * tests/packages.scm ("search paths"): Change 'directories' field to 'files'. * guix/scripts/environment.scm (for-each-search-path): Likewise.
* | | | monads: Move '%store-monad' and related procedures where they belong.Ludovic Courtès2015-01-14
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This turns (guix monads) into a generic module for monads, and moves the store monad and related monadic procedures in their corresponding module. * guix/monads.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file, package-file, package->derivation, package->cross-derivation, origin->derivation, imported-modules, compiled, modules, built-derivations, run-with-store): Move to... * guix/store.scm (store-return, store-bind, %store-monad, store-lift, text-file, interned-file): ... here. (%guile-for-build): New variable. (run-with-store): Moved from monads.scm. Remove default value for #:guile-for-build. * guix/packages.scm (default-guile): Export. (set-guile-for-build): New procedure. (package-file, package->derivation, package->cross-derivation, origin->derivation): Moved from monads.scm. * guix/derivations.scm (%guile-for-build): Remove. (imported-modules): Rename to... (%imported-modules): ... this. (compiled-modules): Rename to... (%compiled-modules): ... this. (built-derivations, imported-modules, compiled-modules): New procedures. * gnu/services/avahi.scm, gnu/services/base.scm, gnu/services/dbus.scm, gnu/services/dmd.scm, gnu/services/networking.scm, gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system/install.scm, gnu/system/linux-initrd.scm, gnu/system/shadow.scm, guix/download.scm, guix/gexp.scm, guix/git-download.scm, guix/profiles.scm, guix/svn-download.scm, tests/monads.scm: Adjust imports accordingly. * guix/monad-repl.scm (default-guile-derivation): New procedure. (store-monad-language, run-in-store): Use it. * build-aux/hydra/gnu-system.scm (qemu-jobs): Add explicit 'set-guile-for-build' call. * guix/scripts/archive.scm (derivation-from-expression): Likewise. * guix/scripts/build.scm (options/resolve-packages): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/system.scm (guix-system): Likewise. * doc/guix.texi (The Store Monad): Adjust module names accordingly.
* | | import: Add CPAN importer.Eric Bavier2015-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/import/cpan.scm, guix/scripts/import/cpan.scm, tests/cpan.scm: New files. * Makefile.am (MODULE)[HAVE_GUILE_JSON]: Add them. * guix/scripts/import.scm (importers): Add cpan. * doc/guix.texi (Requirements): Mention `guix import cpan` as a user of guile-json. (Invoking guix import): Document new `guix import cpan` command.
* | | substitute-binary: Micro-optimize 'narinfo-sha256'.Ludovic Courtès2015-01-09
| |/ |/| | | | | | | | | | | | | * guix/scripts/substitute-binary.scm (narinfo-signature->canonical-sexp): Change "~a" to "~s" in error message. (%signature-line-rx): Remove. (narinfo-sha256): Use 'string-contains' instead of 'regexp-exec', and 'string-take' instead of 'match:substring'.
* | lint: Add tests for the 'home-page' checker.Ludovic Courtès2014-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Cyril Roelandt <tipecaml@gmail.com>. * tests/lint.scm (%http-server-port, %http-server-socket, %local-url, stub-http-server): New variables. (http-write, call-with-http-server): New procedures. (with-http-server): New macro. ("home-page: wrong home-page", "home-page: invalid URI", "home-page: host not found", "home-page: Connection refused", "home-page: 200", "home-page: 404"): New tests. * guix/scripts/lint.scm (check-home-page): Export.
* | lint: Report on the package being checked.Ludovic Courtès2014-12-28
| | | | | | | | | | | | * guix/scripts/lint.scm (run-checkers): Check whether (current-error-port) is a tty, and print the package being checked and the checker currently running when it is.
* | lint: Add 'home-page' checker.Ludovic Courtès2014-12-28
|/ | | | | | * guix/build/download.scm (open-connection-for-uri): Export. * guix/scripts/lint.scm (probe-uri, check-home-page): New procedures. (%checkers): Add 'home-page' checker.
* substitute-binary: Add missing newline in download progress report.Ludovic Courtès2014-12-09
| | | | | | | | Fixes <http://bugs.gnu.org/19313>. Reported by rekado <rekado@elephly.net>. * guix/scripts/substitute-binary.scm (guix-substitute-binary) <--substitute>: Add 'newline' call.
* system: Don't make /boot/grub/grub.cfg a symlink to the store.Ludovic Courtès2014-12-09
| | | | | | | | | | | | | | | This would not work when /boot is a separate partition, as reported by Nikita Karetnikov <nikita@karetnikov.org> in <http://bugs.gnu.org/19220>. This fixes a regression introduced in 39d1f82. * gnu/build/install.scm (install-grub): Copy GRUB.CFG instead of symlinking it, as was the case before 39d1f82. * gnu/build/vm.scm (register-grub.cfg-root): Add 'grub.cfg' parameter. Make it a permanent GC root instead of an indirect GC root. (initialize-hard-disk): Adjust accordingly. * guix/scripts/system.scm (install-grub*): Replace use of 'add-indirect-root' by the addition of a permanent GC root in %GC-ROOTS-DIRECTORY.
* guix system: Fix typo affecting 'guix system init'.Ludovic Courtès2014-12-07
| | | | | | | | | Fixes <http://bugs.gnu.org/19279>. Fixes a regression introduced in cc7fa59. Reported by Tomas Cech <tcech@suse.cz>. * guix/scripts/system.scm (install): Fix order of arguments to 'lift' and 'lift2'.
* guix: scripts: Parse $GUIX_BUILD_OPTIONS separately.nebuli2014-12-06
| | | | | | | | | | | | | | | | | | | | Appending to "raw" args broke optional parameters in 'guix package -I' and 'guix package -A', and possibly other places. Therefore, switch to parsing each set of options on its own and append resulting alists together afterwards. * guix/scripts/archive.scm (parse-options-from): Rename from (parse-options) and add explicit argument. New form of (parse-options) using its old algorithm via -from function. * guix/scripts/build.scm: Ditto. * guix/scripts/environment.scm: Ditto. * guix/scripts/package.scm: Ditto. * guix/scripts/system.scm: Ditto. * tests/guix-package.sh: Add test. * doc/guix.texi (Invoking guix build): Make it clear that the options are parsed independently. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* system: Make /boot/grub/grub.cfg an indirect GC root.Ludovic Courtès2014-12-04
| | | | | | | | | | Fixes <http://bugs.gnu.org/19160>. * guix/scripts/system.scm (install-grub*): Make /boot/grub/grub.cfg an indirect GC root. * gnu/build/install.scm (install-grub): Make TARGET a symlink. * gnu/build/vm.scm (register-grub.cfg-root): New procedure. (initialize-hard-disk): Use it.
* guix system: Factorize 'grub-install' error handling, and use more 'mbegin'.Ludovic Courtès2014-12-04
| | | | | | * guix/scripts/system.scm (install-grub*): New procedure. (install): Use it, and use 'mwhen?'. (perform-action) <reconfigure>: Likewise.
* guix system: Use 'mbegin' for 'install'.Ludovic Courtès2014-12-02
| | | | | * guix/scripts/system.scm (install): Use 'mbegin'. Lift FORMAT and POPULATE-ROOT-FILE-SYSTEM, and use the result.
* 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>
* substitute-binary: Change "unresponsive" to "slow".Ludovic Courtès2014-11-28
| | | | | | * guix/scripts/substitute-binary.scm (fetch): Change "unresponsive" to "somewhat slow". I'm being told that the former is often misunderstood as "broken".
* guix build: Add '--max-jobs' option.Ludovic Courtès2014-11-25
| | | | | | | | | | | | | Suggested by Deck Pickard <deck.r.pickard@gmail.com>. * guix/scripts/build.scm (show-build-options-help): Document --max-jobs. (set-build-options-from-command-line): Pass #:max-build-jobs. (%standard-build-options): Add --max-jobs. * doc/guix.texi (Invoking guix-daemon): Document the meaning of '--max-jobs 0'. (Invoking guix build): Document --max-jobs, with a reference to "Invoking guix-daemon'.
* guix system: Add '--share' and '--expose' options for 'vm'.Ludovic Courtès2014-11-21
| | | | | | | | | | | * guix/scripts/system.scm (system-derivation-for-action): Add #:mappings parameter. Pass it to 'system-qemu-image/shared-store-script'. (perform-action): Likewise. (show-help): Document --share and --expose. (specification->file-system-mapping): New procedure. (%options): Add --share and --expose. (guix-system): Pass #:mapping to 'perform-action'. * doc/guix.texi (Invoking guix system): Document it.
* lint: Fix typos in checker descriptions.Ludovic Courtès2014-11-19
| | | | | * guix/scripts/lint.scm (%checkers): "file names" (two words), and "synopses" (plural).
* lint: Use localized checker descriptions.Ludovic Courtès2014-11-19
| | | | | * guix/scripts/lint.scm (list-checkers-and-exit): Wrap 'lint-checker-description' call in (_ ...).
* lint: Correctly internationalize warning messages.Ludovic Courtès2014-11-19
| | | | | | | | * guix/scripts/lint.scm (emit-warning): Remove '_' call for format string. (check-description-style, check-inputs-should-be-native, check-synopsis-style, check-patches, check-gnu-synopsis+description): Wrap message in (_ ...).
* lint: Change checker names to be symbols.Ludovic Courtès2014-11-19
| | | | | | * guix/scripts/lint.scm (%checkers): Change 'name' fields to be symbols. (%options): Adjust "-c" option handler accordingly.
* lint: Fold 'sync-descriptions' script as 'gnu-description' lint checker.Ludovic Courtès2014-11-19
| | | | | | | | | | * build-aux/sync-descriptions.scm: Remove. Move payload to... * guix/scripts/lint.scm: ... here. (escape-quotes, official-gnu-packages*, check-gnu-synopsis+description): New procedures. (%checkers): Add 'gnu-descriptions'. * Makefile.am (EXTRA_DIST): Remove build-aux/sync-descriptions.scm. (sync-descriptions): Use 'guix lint'.
* substitute-binary: Be slightly less verbose when downloading.Ludovic Courtès2014-11-13
| | | | | * guix/scripts/substitute-binary.scm (guix-substitute-binary)<"--substitute">: Be slightly less verbose.
* guix system: Decorate GRUB entries of old generations with date and number.Ludovic Courtès2014-11-11
| | | | | | * guix/scripts/system.scm (seconds->string): New procedure. (previous-grub-entries)[system->grub-entry]: Add 'number' and 'time' parameters. Adjust call accordingly.
* import: Add GNU importer.Ludovic Courtès2014-11-11
| | | | | | | | | | | Suggested by Karl Berry <karl@gnu.org> and Andreas Enge <andreas@enge.fr>. * guix/import/gnu.scm, guix/scripts/import/gnu.scm: New files. * Makefile.am (MODULES): Add them. * guix/scripts/import.scm (importers): Add "gnu". * guix/gnu-maintenance.scm (gnu-release-archive-types): New procedure. (download-tarball): Export.
* pull: Use the build procedure provided by the newly-downloaded Guix.Ludovic Courtès2014-11-09
| | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/18534>. * guix/scripts/pull.scm (with-environment-variable, with-PATH): New macros. (temporary-directory, first-directory, interned-then-deleted): New procedures. (unpack): Rewrite to do the unpacking in the current process rather than as a separate derivation. (%self-build-file): New variable. (build-from-source): New procedure. (build-and-install): Use it. * guix/build/pull.scm (build-guix): Rename 'tarball' argument to 'source'. Remove #:tar and #:gzip parameters, as well as 'tar' invocation. Remove 'scandir' invocation. Wrap body in 'with-directory-excursion'. * build-aux/build-self.scm: New file. * Makefile.am (EXTRA_DIST): Add it.
* vm: Fix 'vm --full-boot' to produce a sufficient disk image.Ludovic Courtès2014-11-08
| | | | | | | | | | * gnu/system/vm.scm (system-qemu-image/shared-store): Add #:disk-image-size and #:full-boot? parameters and honor them. Pass '#:copy-inputs? full-boot?', and change #:inputs argument. * guix/scripts/system.scm (system-derivation-for-action): Pass #:disk-image-size to 'system-qemu-image/shared-store'. * doc/guix.texi (Invoking guix system): Mention use of '--image-size' in conjunction with '--full-boot'.
* vm: Support 'guix system vm --full-boot'.Ludovic Courtès2014-11-08
| | | | | | | | | | | * gnu/system/vm.scm (system-qemu-image/shared-store-script): Add #:full-boot? parameter and honor it. * guix/scripts/system.scm (system-derivation-for-action): Likewise. (perform-action): Likewise. (show-help): Document '--full-boot'. (%options): Add '--full-boot'. (guix-system): Add #:full-boot? argument in call to 'perform-action'. * doc/guix.texi (Invoking guix system): Document it.
* lint: Allow synopses that start with an abbreviation.Ludovic Courtès2014-11-07
| | | | | | * guix/scripts/lint.scm (starts-with-abbreviation?): New procedure. (check-synopsis-style)[check-start-with-package-name]: Use it. * tests/lint.scm ("synopsis: start with abbreviation"): New test.
* lint: Skip starting-article test for the synopses of GNU packages.Ludovic Courtès2014-11-07
| | | | | * guix/scripts/lint.scm (check-synopsis-style)[check-start-article]: Change to (const #t) when PACKAGE matches 'gnu-package?'.
* lint: Tolerate sentences that start with a parenthesis or a quote.Ludovic Courtès2014-11-07
| | | | | * guix/scripts/lint.scm (properly-starts-sentence?): Add (, ", and ' as valid beginnings.
* lint: Improve check for synopses starting with package name.Ludovic Courtès2014-11-07
| | | | | | | * guix/scripts/lint.scm (package-name-regexp): New procedure. (check-synopsis-style)[check-start-with-package-name]: Use it instead of 'string-prefix-ci?'. * tests/lint.scm ("synopsis: start with package name prefix"): New test.
* import: pypi: Gracefully handle wrong argument counts.Ludovic Courtès2014-11-05
| | | | | * guix/scripts/import/pypi.scm (guix-import-pypi): Use 'leave' to handle cases where ARGS has zero or two or more elements.
* import: pypi: Gracefully handle non-existent packages.Ludovic Courtès2014-11-05
| | | | | | | | | | | Fixes <http://bugs.gnu.org/18831>. Reported by Ian Denhardt <ian@zenhack.net>. * guix/import/pypi.scm (url-fetch, json-fetch, pypi-fetch): Augment docstring to mention #f on failure. (pypi->guix-package): Likewise, and actually return #f on failure. * guix/scripts/import/pypi.scm (guix-import-pypi): Call 'leave' when 'pypi->guix-package' returns #f.
* packages: Implement grafts.Ludovic Courtès2014-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Mark H. Weaver <mhw@netris.org> for insightful discussions and suggestions. * guix/packages.scm (<package>)[graft]: New field. (patch-and-repack): Invoke 'package-derivation' with #:graft? #f. (package-source-derivation): Likewise. Do not use (%guile-for-build) in call to 'patch-and-repack', and we could end up using a grafted Guile. (expand-input): Likewise, also for 'package-cross-derivation' call. (package->bag): Add #:graft? parameter. Honor it. Use 'strip-append' instead of 'package-full-name'. (input-graft, input-cross-graft, bag-grafts, package-grafts): New procedures. (package-derivation, package-cross-derivation): Add #:graft? parameter and honor it. * gnu/packages/bootstrap.scm (package-with-bootstrap-guile): Add recursive call on 'graft'. * guix/build-system/gnu.scm (package-with-explicit-inputs, package-with-extra-configure-variable, static-package): Likewise. (gnu-build): Use the ungrafted Guile to avoid full rebuilds. (gnu-cross-build): Likewise. * guix/build-system/cmake.scm (cmake-build): Likewise. * guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise. * guix/build-system/perl.scm (perl-build): Likewise. * guix/build-system/python.scm (python-build): Likewise. * guix/build-system/ruby.scm (ruby-build): Likewise. * guix/build-system/trivial.scm (guile-for-build): Likewise. * tests/packages.scm ("package-derivation, direct graft", "package-cross-derivation, direct graft", "package-grafts, indirect grafts", "package-grafts, indirect grafts, cross", "package-grafts, indirect grafts, propagated inputs", "package-derivation, indirect grafts"): New tests. ("bag->derivation", "bag->derivation, cross-compilation"): Wrap in 'parameterize'. * doc/guix.texi (Security Updates): New node. (Invoking guix build): Document --no-graft.
* environment: Improve '--help' output.Ludovic Courtès2014-10-30
| | | | | | * guix/scripts/environment.scm (show-help): Align --pure and --search-paths with other long options; add 'newline' call before 'show-bug-report-information' call.
* offload: Remove mutual exclusion on transfers.Ludovic Courtès2014-10-29
| | | | | | | | Suggested by Mark H. Weaver <mhw@netris.org> at <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00352.html>. * guix/scripts/offload.scm (transfer-and-offload): Remove uses of 'with-machine-lock'.