[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11/15: derivations: 'build-derivations' can be passed derivation inputs.
From: |
guix-commits |
Subject: |
11/15: derivations: 'build-derivations' can be passed derivation inputs. |
Date: |
Thu, 27 Jun 2019 05:15:46 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 7c690a47381f645ec5ec0a1fd6ffc34dba1b69c2
Author: Ludovic Courtès <address@hidden>
Date: Sun Jun 23 12:39:39 2019 +0200
derivations: 'build-derivations' can be passed derivation inputs.
* guix/derivations.scm (build-derivations): Accept <derivation-input>
records among DERIVATIONS.
* tests/derivations.scm ("build-derivations with specific output"): Test
it.
---
guix/derivations.scm | 5 +++++
tests/derivations.scm | 7 +++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/guix/derivations.scm b/guix/derivations.scm
index 403e867..433b455 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -1016,6 +1016,11 @@ derivation/output pairs, using the specified MODE."
(build-things store (map (match-lambda
((? derivation? drv)
(derivation-file-name drv))
+ ((? derivation-input? input)
+ (cons (derivation-input-path input)
+ (string-join
+ (derivation-input-sub-derivations input)
+ ",")))
((? string? file) file)
(((? derivation? drv) . output)
(cons (derivation-file-name drv)
diff --git a/tests/derivations.scm b/tests/derivations.scm
index 54fa588..d173a78 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -807,9 +807,12 @@
;; Ask for nothing but the "out" output of DRV.
(build-derivations store `((,drv . "out")))
+ ;; Synonymous:
+ (build-derivations store (list (derivation-input drv '("out"))))
+
(valid-path? store out)
- (equal? (pk 'x content) (pk 'y (call-with-input-file out
get-string-all)))
- )))))
+ (equal? (pk 'x content)
+ (pk 'y (call-with-input-file out get-string-all))))))))
(test-assert "build-expression->derivation and derivation-build-plan"
(let ((drv (build-expression->derivation %store "fail" #f)))
- branch master updated (b09e496 -> c30d117), guix-commits, 2019/06/27
- 01/15: accounts: Use 'fsync' instead of 'fdatasync'., guix-commits, 2019/06/27
- 03/15: syscalls: Add 'terminal-rows'., guix-commits, 2019/06/27
- 06/15: derivations: Rewrite and replace 'derivations-prerequisites-to-build'., guix-commits, 2019/06/27
- 04/15: ui: Add 'display-search-results' and use it., guix-commits, 2019/06/27
- 02/15: ui: 'relevance' considers regexps connected with a logical and., guix-commits, 2019/06/27
- 11/15: derivations: 'build-derivations' can be passed derivation inputs.,
guix-commits <=
- 05/15: derivations: Add 'derivation-input'., guix-commits, 2019/06/27
- 15/15: tests: Avoid TCP port collision between lint.scm and guix-daemon.sh., guix-commits, 2019/06/27
- 13/15: ui: 'show-what-to-build' accepts derivation inputs., guix-commits, 2019/06/27
- 09/15: derivations: <derivation-input> now aggregates a <derivation>., guix-commits, 2019/06/27
- 10/15: derivations: 'derivation' preserves pointer equality., guix-commits, 2019/06/27
- 08/15: graph: Use 'derivation-input-derivation'., guix-commits, 2019/06/27
- 07/15: ui: 'show-what-to-build' uses 'derivation-build-plan'., guix-commits, 2019/06/27
- 14/15: ui: 'show-derivation-outputs' accepts <derivation-input> records., guix-commits, 2019/06/27
- 12/15: packages: 'specification->package+output' distinguishes "no output specified"., guix-commits, 2019/06/27