summaryrefslogtreecommitdiff
path: root/guix/scripts/build.scm
Commit message (Collapse)AuthorAge
...
* guix build: Add '--with-git-url'.Ludovic Courtès2019-03-17
| | | | | | | | | | | | * guix/scripts/build.scm (%not-equal): New variable. (evaluate-git-replacement-specs): Use it instead of local variable 'not-equal'. (transform-package-source-git-url): New procedure. (%transformations): Add 'with-git-url'. (%transformation-options, show-transformation-options-help): Add '--with-git-url'. * tests/scripts-build.scm ("options->transformation, with-git-url"): New test.
* Avoid name clash with 'build' from (guix store) and (guix status).Ludovic Courtès2019-02-11
| | | | | | | | | | | | | | | | Since commit 976ef2d97887d16eab8d4eb9dad811786b04d690, (guix status) exports 'build', which clashes with 'build' from (guix store). * build-aux/run-system-tests.scm: Select 'with-status-verbosity' from (guix status). * guix/scripts/archive.scm: Likewise. * guix/scripts/build.scm: Likewise. * guix/scripts/copy.scm: Likewise. * guix/scripts/environment.scm: Likewise. * guix/scripts/pack.scm: Likewise. * guix/scripts/package.scm: Likewise. * guix/scripts/pull.scm: Likewise. * guix/scripts/system.scm: Likewise.
* guix build: '--with-branch' & co. fetch submodules.Ludovic Courtès2019-02-08
| | | | | * guix/scripts/build.scm (transform-package-source-branch)[replace]: Add 'recursive?' field to the new package.
* guix build: Re-purpose '--verbosity' and add '--debug'.Ludovic Courtès2019-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous '--verbosity' option was misleading and rarely what users were looking for. The new option provides a consistent way to choose whether or not to display the build log. * guix/scripts/build.scm (show-build-options-help): Remove "--verbosity" and add "--debug". (set-build-options-from-command-line): Use the 'debug key of OPTS for #:verbosity. (%standard-build-options): Change "verbosity" to "debug". Use 'string->number*' instead of 'string->number'. (%default-options): Change 'verbosity to 'debug and add a 'verbosity key. (show-help): Add '--verbosity'. (%options): Likewise, and change '--quiet' to set the 'verbosity key of RESULT. (guix-build): Use 'with-status-verbosity' instead of parameterizing CURRENT-BUILD-OUTPUT-PORT, honor the 'verbosity key of OPTS, and remove 'quiet?'. * guix/scripts/environment.scm (show-help, %options): Add '--verbosity'. (%default-options): Add 'debug'. (guix-environment): Honor the 'verbosity key of OPTS. * guix/scripts/pack.scm (%default-options): Add 'debug. (%options, show-help): Add '--verbosity'. (guix-pack): Honor the 'verbosity key of OPTS. * guix/scripts/package.scm (%default-options): Add 'debug. (show-help, %options): Add '--verbosity'. Mark '--verbose' as deprecated and change it to set 'verbosity. (guix-package): Honor the 'verbosity key of OPTS and remove 'verbose?'. * guix/scripts/pull.scm (%default-options): Add 'debug. (show-help, %options): Add '--verbosity'. (guix-pull): Honor the 'verbosity key of OPTS. * guix/scripts/system.scm (show-help, %options): Add '--verbosity'. (%default-options): Add 'debug. (guix-system): Honor the 'verbosity key of OPTS. * guix/scripts/archive.scm (%default-options): Add 'debug, 'print-build-trace?, 'print-extended-build-trace?, and 'multiplexed-build-output?. (show-help, %options): Add '--verbosity'. (export-from-store): Remove call to 'set-build-options-from-command-line'. (guix-archive): Wrap body in 'with-status-verbosity'. Add call to 'set-build-options-from-command-line. * doc/guix.texi (Common Build Options): Document '--verbosity' and '--debug'. (Additional Build Options): Adjust description of '--quiet'.
* guix build: Honor '--system' for file-like objects and gexps.Ludovic Courtès2019-01-05
| | | | | | | | Fixes a bug whereby "guix build -f file.scm -s SYSTEM" would not honor SYSTEM when 'file.scm' returns a gexp or a file-like object. * guix/scripts/build.scm (options->derivations): Pass #:system to 'run-with-store' in the 'file-like?' and 'gexp?' cases.
* build: Default to https://ci.guix.info for substitutes.Ludovic Courtès2018-12-04
| | | | | | | | | * config-daemon.ac (guix_substitute_urls): Always default to "https://ci.guix.info". * doc/guix.texi (SUBSTITUTE-SERVER): Switch to ci.guix.info. * guix/scripts/build.scm (%default-log-urls): Likewise. * guix/scripts/substitute.scm (%default-substitute-urls): Likewise. * guix/store.scm (%default-substitute-urls): Likewise.
* guix build: Add '--with-commit'.Ludovic Courtès2018-11-30
| | | | | | | | | | | | | | * guix/git.scm (<git-checkout>)[commit]: New field. (git-checkout-compiler): Honor it. * guix/scripts/build.scm (evaluate-git-replacement-specs): Add 'proc' parameter and honor it. (transform-package-source-branch)[replace]: New procedure. Adjust 'evaluate-git-replacement-specs' accordingly. (transform-package-source-commit): New procedure. (%transformations, %transformation-options) (show-transformation-options-help): Add 'with-commit'. * tests/guix-build-branch.sh: Add test. * doc/guix.texi (Package Transformation Options): Document it.
* guix build: Add '--with-branch' transformation option.Ludovic Courtès2018-11-30
| | | | | | | | | | * guix/scripts/build.scm (evaluate-git-replacement-specs) (transform-package-source-branch): New procedures. (%transformations, %transformation-options): Add 'with-branch'. (show-transformation-options-help): Likewise. * tests/guix-build-branch.sh: New file. * Makefile.am (SH_TESTS): Add it. * doc/guix.texi (Package Transformation Options): Document it.
* status: Build upon multiplexed build output.Ludovic Courtès2018-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for more accurate status tracking and parsing of extended build traces. * guix/status.scm (multiplexed-output-supported?): New procedure. (print-build-event): Don't print \r when PRINT-LOG? is true. Adjust 'build-log' handling for when 'multiplexed-output-supported?' returns true. (bytevector-index, split-lines): New procedures. (build-event-output-port)[%build-output-pid, %build-output] [%build-output-left]: New variables. [process-line]: Handle "@ build-output" traces. [process-build-output]: New procedure. [write!]: Add case for when %BUILD-OUTPUT-PID is true. Use 'bytevector-index' rather than 'string-index'. (compute-status): Add #:derivation-path->output-path. Use it. * tests/status.scm ("compute-status, multiplexed build output"): New test. ("build-output-port, UTF-8") ("current-build-output-port, UTF-8 + garbage"): Adjust to new 'build-log' output. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:multiplexed-build-output?. (%default-options): Add 'multiplexed-build-output?'. * guix/scripts/environment.scm (%default-options): Likewise. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/package.scm (%default-options): Likewise. * guix/scripts/pull.scm (%default-options): Likewise. * guix/scripts/system.scm (%default-options): Likewise.
* guix build: '-f' accepts file-like objects.Ludovic Courtès2018-10-09
| | | | | | | | * guix/scripts/build.scm (options->things-to-build)[validate-type]: Check for 'file-like?'. (options->derivations): Accept 'file-like?'. * tests/guix-build.sh: Add a test with 'computed-file'. * doc/guix.texi (Additional Build Options): Mention file-like objects.
* Add (guix status) and use it for pretty colored output.Ludovic Courtès2018-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/progress.scm (progress-reporter/trace): New procedure. (%progress-interval): New variable. (progress-reporter/file): Use it. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:print-extended-build-trace?. (%default-options): Add 'print-extended-build-trace?'. (guix-build): Parameterize CURRENT-TERMINAL-COLUMNS. Use 'build-status-updater'. * guix/scripts/environment.scm (%default-options): Add 'print-extended-build-trace?'. (guix-environment): Wrap body in 'with-status-report'. * guix/scripts/pack.scm (%default-options): Add 'print-build-trace?' and 'print-extended-build-trace?'. (guix-pack): Wrap body in 'with-status-report'. * guix/scripts/package.scm (%default-options, guix-package): Likewise. * guix/scripts/system.scm (%default-options, guix-system): Likewise. * guix/scripts/pull.scm (%default-options, guix-pull): Likewise. * guix/scripts/substitute.scm (progress-report-port): Don't call STOP when TOTAL is zero. (process-substitution): Add #:print-build-trace? and honor it. (guix-substitute)[print-build-trace?]: New variable. Pass #:print-build-trace? to 'process-substitution'. * guix/status.scm: New file. * guix/store.scm (set-build-options): Add #:print-extended-build-trace?; pass it into PAIRS. (%protocol-version): Bump. (protocol-version, nix-server-version): New procedures. (current-store-protocol-version): New variable. (with-store, build-things): Parameterize it. * guix/ui.scm (build-output-port): Remove. (colorize-string): Export. * po/guix/POTFILES.in: Add guix/status.scm. * tests/status.scm: New file. * Makefile.am (SCM_TESTS): Add it. * nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x162. * nix/libstore/build.cc (DerivationGoal::registerOutputs) (SubstitutionGoal::finished): Print a "@ hash-mismatch" trace before throwing.
* guix: Do not close current-error-port.Ricardo Wurmus2018-09-11
| | | | | | | | Reported-by: Ludovic Courtès <ludo@gnu.org>. * guix/scripts/build.scm (guix-build), guix/scripts/package.scm (guix-package): Duplicate port before handing it to build-output-port.
* ui: Add soft port for styling and filtering build output.Ricardo Wurmus2018-09-09
| | | | | | | | | * guix/ui.scm (build-output-port): New procedure. * guix/scripts/package.scm (%default-options): Print build trace. (guix-package): Use build-output-port. * guix/scripts/build.scm (guix-build): Use build-output-port. Co-authored-by: Sahithi Yarlagadda <sahi@swecha.net>
* guix build: Nicely report unbound variables with hints.Ludovic Courtès2018-05-04
| | | | | | | | | | | | | * guix/ui.scm (print-unbound-variable-error): Add "error:" to the message. (report-unbound-variable-error): New procedure, with code formerly in 'report-load-error'. (report-load-error): Use it. (call-with-unbound-variable-handling): New procedure. (with-unbound-variable-handling): New macro. * guix/scripts/build.scm (options->derivations): Wrap body in 'with-unbound-variable-handling'. * tests/guix-build.sh (GUIX_PACKAGE_PATH): Add test.
* guix build: 'guix build --log-file' gracefully reports certificate errors.Ludovic Courtès2018-03-26
| | | | | | | | Previously 'guix build --log-file' would print a backtrace upon X.509 certificate verification errors. * guix/scripts/build.scm (log-url): Catch 'tls-certificate-error' in addition to 'getaddrinfo-error'.
* guix build: Support '--with-source=PACKAGE@VERSION=URI'.Ludovic Courtès2017-12-23
| | | | | | | | | | | | | * guix/scripts/build.scm (numeric-extension?, tarball-base-name): New procedures, formerly in 'package-with-source'. (transform-package-source)[new-sources]: Look for '=' in URI. Each element of the list of now a (PKG VERSION SOURCE) tuple. Pass VERSION to 'package-with-source'. (package-with-source): Add 'version' parameter and honor it. * tests/scripts-build.scm ("options->transformation, with-source, PKG=URI") ("options->transformation, with-source, PKG@VER=URI"): New tests. * doc/guix.texi (Package Transformation Options): Document the new forms.
* guix: Revert accidentally committed changes.Ricardo Wurmus2017-09-28
| | | | | | | | This is a follow-up to commit fb1db385476bc4548d3eadea93b5dd6a346839f2. * guix/scripts/build.scm (lazy-util): Remove procedure. (options->things-to-build): Remove special case for files with ".json" extension.
* import: Add JSON importer.Ricardo Wurmus2017-09-28
| | | | | | | * doc/guix.texi (Invoking guix import): Document it. * guix/scripts/import/json.scm: New file. * Makefile.am (MODULES): Add it. * guix/scripts/import.scm (importers): Add json importer.
* derivations: Introduce 'read-derivation-from-file'.Ludovic Courtès2017-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids the open/fstat/close syscalls upon a cache hit that we had with the previous idiom: (call-with-input-file file read-derivation) where caching happened in 'read-derivation' itself. * guix/derivations.scm (%read-derivation): Rename to... (read-derivation): ... this. (read-derivation-from-file): New procedure. (derivation-prerequisites, substitution-oracle) (derivation-prerequisites-to-build): (derivation-path->output-path, derivation-path->output-paths): (derivation-path->base16-hash, map-derivation): Use 'read-derivation-from-file' instead of (call-with-input-file … read-derivation). * guix/grafts.scm (item->deriver): Likewise. * guix/scripts/build.scm (log-url, options->things-to-build): Likewise. * guix/scripts/graph.scm (file->derivation): Remove. (derivation-dependencies, %derivation-node-type): Use 'read-derivation-from-file' instead. * guix/scripts/offload.scm (guix-offload): Likewise. * guix/scripts/perform-download.scm (guix-perform-download): Likewise. * guix/scripts/publish.scm (load-derivation): Remove. (narinfo-string): Use 'read-derivation-from-file'.
* ui: Rename '_' to 'G_'.Ludovic Courtès2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids collisions with '_' when the latter is used as a 'match' pattern for instance. See <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>. * guix/ui.scm: Rename '_' to 'G_'. * po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly. * build-aux/compile-all.scm (warnings): Remove 'format'. * gnu/packages.scm, gnu/services.scm, gnu/services/shepherd.scm, gnu/system.scm, gnu/system/shadow.scm, guix/gnupg.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/elpa.scm, guix/import/pypi.scm, guix/nar.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/container.scm, guix/scripts/container/exec.scm, guix/scripts/copy.scm, guix/scripts/download.scm, guix/scripts/edit.scm, guix/scripts/environment.scm, guix/scripts/gc.scm, guix/scripts/graph.scm, guix/scripts/hash.scm, guix/scripts/import.scm, guix/scripts/import/cpan.scm, guix/scripts/import/cran.scm, guix/scripts/import/crate.scm, guix/scripts/import/elpa.scm, guix/scripts/import/gem.scm, guix/scripts/import/gnu.scm, guix/scripts/import/hackage.scm, guix/scripts/import/nix.scm, guix/scripts/import/pypi.scm, guix/scripts/import/stackage.scm, guix/scripts/lint.scm, guix/scripts/offload.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/perform-download.scm, guix/scripts/publish.scm, guix/scripts/pull.scm, guix/scripts/refresh.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/scripts/system.scm, guix/ssh.scm, guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
* build: Add and export procedure 'register-root*'.Chris Marusich2017-04-06
| | | | | | * guix/scripts/build.scm (register-root*): Add and export it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* build: Export register-root procedure.Chris Marusich2017-04-05
| | | | | | * guix/scripts/build.scm: Export register-root procedure. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* Add (guix memoization).Ludovic Courtès2017-01-28
| | | | | | | | | | | | | * guix/combinators.scm (memoize): Remove. * guix/memoization.scm: New file. * Makefile.am (MODULES): Add it. * gnu/packages.scm, gnu/packages/bootstrap.scm, guix/build-system/gnu.scm, guix/build-system/python.scm, guix/derivations.scm, guix/gnu-maintenance.scm, guix/import/cran.scm, guix/import/elpa.scm, guix/modules.scm, guix/scripts/build.scm, guix/scripts/graph.scm, guix/scripts/lint.scm, guix/store.scm, guix/utils.scm: Adjust imports accordingly.
* guix environment, build: Allow absolute file names with '--root'.Ludovic Courtès2017-01-19
| | | | | | | | | Reported by Chris Webber. * guix/scripts/build.scm (register-root): If ROOT is absolute, keep it as is. * guix/scripts/environment.scm (register-gc-root): Likewise. * tests/guix-environment.sh (expected): Add test.
* guix build: Add '--repair'.Ludovic Courtès2017-01-15
| | | | | | * guix/scripts/build.scm (show-help, %options): Add '--repair'. * doc/guix.texi (Invoking guix gc): Mention 'guix build --repair'. (Additional Build Options): Document it.
* guix build: Do not force 'build-cores', 'max-build-jobs', and 'max-silent-time'.Ludovic Courtès2017-01-15
| | | | | | | | | This lets the daemon use its own default settings unless otherwise specified. * guix/scripts/build.scm (set-build-options-from-command-line): Do not provide default values for #:build-cores and #:max-build-jobs. (%default-options): Remove 'max-silent-time'.
* guix build: '--with-source' overrides the 'replacement' of a package.Ludovic Courtès2016-12-21
| | | | | | * guix/scripts/build.scm (package-with-source): Set 'replacement' to #f. * tests/scripts-build.scm ("options->transformation, with-source, replacement"): New test.
* guix build: Add '--with-graft'.Ludovic Courtès2016-10-17
| | | | | | | | | | * guix/scripts/build.scm (transform-package-inputs/graft): New procedure. (%transformations): Add 'with-graft'. (%transformation-options): Likewise. (show-transformation-options-help): Document it. * tests/scripts-build.scm ("options->transformation, with-graft"): New test. * doc/guix.texi (Package Transformation Options): Document it.
* guix build: Factorize transformation option parsing.Ludovic Courtès2016-10-17
| | | | | * guix/scripts/build.scm (%transformation-options): Introduce 'parser' procedure and use it.
* guix build: Extract '--with-input' replacement spec parsing.Ludovic Courtès2016-10-17
| | | | | | * guix/scripts/build.scm (evaluate-replacement-specs): New procedure. (transform-package-inputs)[not-equal]: Remove. [replacements]: Define in terms of 'evaluate-replacement-specs'.
* guix build: Gracefully handle packages without source for '-S'.Ludovic Courtès2016-09-27
| | | | | | | | Fixes <http://bugs.gnu.org/22836>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/scripts/build.scm (options->derivations): Gracefully handle (package-source p) = #f.
* ui: Do not shadow '_' where it's used as a literal syntax match.Ludovic Courtès2016-09-20
| | | | | | | | | | | | | | | | | | Fixes compilation with Guile 2.1. Reported by Mu Lei. * guix/ui.scm (report-load-error) (warn-about-load-error, read/eval-package-expression): Use 'rest' instead of '_' as the pattern variable name. * gnu/packages.scm (%find-package): Likewise. * guix/scripts/build.scm (transform-package-inputs): Likewise. * guix/scripts/hash.scm (guix-hash): Likewise. * guix/scripts/import/gnu.scm (%options, guix-import-gnu): Likewise. * guix/scripts/import/nix.scm (guix-import-nix): Likewise. * guix/scripts/offload.scm (build-machines): Likewise. * guix/scripts/refresh.scm (%options): Likewise. * guix/scripts/substitute.scm (narinfo-signature->canonical-sexp): Likewise.
* guix build: Rewrite '--with-input' in terms of 'package-input-rewriting'.Ludovic Courtès2016-09-01
| | | | | * guix/scripts/build.scm (transform-package-inputs): Rewrite in terms of 'package-input-rewriting'.
* guix scripts: Disable grafting on dry runs.Roel Janssen2016-08-28
| | | | | | * guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/environment.scm, guix/scripts/system.scm, guix/scripts/package.scm: Disable grafting when a dry-run parameter is given.
* guix build: Catch 'getaddrinfo-error' for '--log-file'.Ludovic Courtès2016-05-14
| | | | | * guix/scripts/build.scm (log-url)[valid-url?]: Catch 'getaddrinfo-error'.
* guix build: Do not show what to build when '-d' is used.Ludovic Courtès2016-05-14
| | | | | * guix/scripts/build.scm (guix-build): Don't call 'show-what-to-build' when OPTS contains 'derivations-only?'.
* utils: Move combinators to (guix combinators).Ludovic Courtès2016-05-04
| | | | | | | | | | | | | | | | | | | * guix/utils.scm (compile-time-value, memoize, fold2) (fold-tree, fold-tree-leaves): Move to... * guix/combinators: ... here. New file. * tests/utils.scm ("fold2, 1 list", "fold2, 2 lists") (fold-tree tests): Move to... * tests/combinators.scm: ... here. New file. * Makefile.am (MODULES, SCM_TESTS): Add them. * gnu/packages.scm, gnu/packages/bootstrap.scm, gnu/services/herd.scm, guix/build-system/gnu.scm, guix/build-system/python.scm, guix/derivations.scm, guix/gnu-maintenance.scm, guix/import/elpa.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/graph.scm, guix/scripts/lint.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/serialization.scm, guix/store.scm, guix/ui.scm: Adjust imports accordingly.
* guix build: '--with-source' correctly matches versioned file names.Ludovic Courtès2016-03-23
| | | | | | | | * guix/scripts/build.scm: Use the right 'package-name->name+version' procedure. Fixes a regression introduced in 1b846da8c372bee78851439fd9e72b2499115e5a. * tests/scripts-build.scm ("options->transformation, with-source, with version"): New test.
* guix build: Add '--quiet'.Ludovic Courtès2016-03-08
| | | | | | | | | | Fixes <http://bugs.gnu.org/19772>. Reported by Andrei Osipov <andrspv@gmail.com>. * guix/scripts/build.scm (show-help, %options): Add --quiet. (guix-build): Parameterize 'current-build-output-port' accordingly. * doc/guix.texi (Invoking guix build): Use it in example. (Additional Build Options): Document it.
* guix build: Set the build options early.Ludovic Courtès2016-03-05
| | | | | | | | | | | | This fixes a bug whereby, with grafts leading to builds very early, build options such as --substitute-urls would not be taken into account yet. Reported by Andreas Enge <andreas@enge.fr>. * guix/scripts/build.scm (guix-build): Move 'opts' to the beginning. Use 'with-store' instead of 'open-connection'. Call 'set-build-options-from-command-line' right after 'with-store'.
* guix build: -S returns the replacement's source.Ludovic Courtès2016-03-03
| | | | | | | | Reported by Mark H Weaver. * guix/scripts/build.scm (options->derivations): When SRC and GRAFT? are true, use the source of P's replacement. * tests/guix-build.sh: Add test.
* guix build: Move '--no-grafts' to the common build options.Ludovic Courtès2016-03-02
| | | | | | | | | | | | | | | | * guix/scripts/build.scm (%options): Move --no-grafts to... (%standard-build-options): ... here. (show-help, show-build-options-help): Adjust accordingly. * guix/scripts/archive.scm (%default-options): Add 'graft?'. (guix-archive): Parametrize '%graft?'. * guix/scripts/environment.scm (%default-options): Add 'graft?'. (guix-environment): Parametrize '%graft?'. * guix/scripts/package.scm (%default-options): Add 'graft?'. (guix-package): Parametrize '%graft?'. * guix/scripts/system.scm (%default-options): Add 'graft?'. (guix-system): Parametrize 'graft?'. * doc/guix.texi (Additional Build Options): Move --no-grafts to... (Common Build Options): ... here.
* derivations: Move grafts to (guix grafts).Ludovic Courtès2016-02-22
| | | | | | | | | | | | * guix/derivations.scm (<graft>, graft-derivation, %graft?) (set-grafting): Move to... * guix/grafts.scm: ... here. New file. * guix/gexp.scm, guix/packages.scm, tests/packages.scm, guix/scripts/build.scm: Use it. * Makefile.am (MODULES): Add it. (SCM_TESTS): Add tests/grafts.scm. * tests/derivations.scm ("graft-derivation"): Move to... * tests/grafts.scm: ... here. New file.
* guix build: Add '--with-input'.Ludovic Courtès2016-02-01
| | | | | | | | | | | * guix/scripts/build.scm (transform-package-inputs): New procedure. (%transformations): Add it. (%transformation-options, show-transformation-options-help): Add --with-input. * tests/scripts-build.scm ("options->transformation, with-input"): ("options->transformation, with-input, no matches"): New tests. * tests/guix-build.sh: Add tests. * doc/guix.texi (Package Transformation Options): Document it.
* guix build: Separate transformation options.Ludovic Courtès2016-02-01
| | | | | | | | | | | * guix/scripts/build.scm (%transformation-options): New variable. (show-transformation-options-help): New procedure. (show-help): Remove '--with-source' documentation and add 'show-transformation-options-help' call. (%options): Remove "with-source" and append %TRANSFORMATION-OPTIONS. * doc/guix.texi (Package Transformation Options): New node. Document '--with-source', moved from... (Additional Build Options): ... here.
* guix build: Transformations operate on single objects.Ludovic Courtès2016-02-01
| | | | | | | | | | | * guix/scripts/build.scm (transform-package-source): Return a procedure that expects a single object rather than a list of packages. (options->transformation): Rewrite to precompute the list of applicable transformations and to return a procedure that expects a single object rather than a list of objects. (options->derivations): Adjust accordingly. * tests/scripts-build.scm: New file. * Makefile.am (SCM_TESTS): Add it.
* guix build: Add '--keep-going'.Ludovic Courtès2016-01-19
| | | | | | | | * guix/scripts/build.scm (show-build-options-help) (%standard-build-options): Add --keep-going. * guix/scripts/build.scm (set-build-options-from-command-line): Honor it. * doc/guix.texi (Invoking guix build): Document it.
* guix build: Augment %PATCH-PATH when -L is passed.Ludovic Courtès2015-12-30
| | | | | | | | | Fixes <http://bugs.gnu.org/22259>. Reported by Nikolay Merinov <nikolay.merinov@member.fsf.org>. * guix/scripts/build.scm (%standard-build-options) <-L>: Augment %PATCH-PATH. * tests/guix-package.sh: Add test.
* guix build: Gracefully handle type errors in -e and -f.Ludovic Courtès2015-12-13
| | | | | | * guix/scripts/build.scm (options->things-to-build)[validate-type]: New procedure. [ensure-list]: Use it.
* guix build: Remove dead code.Ludovic Courtès2015-12-13
| | | | | * guix/scripts/build.scm (options->things-to-build): Remove unused 'match' clause.