summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-09-24 22:13:06 +0200
committerLudovic Courtès <ludo@gnu.org>2020-10-02 23:28:09 +0200
commitad54a73bb820a685f242976a86be63931789fa97 (patch)
tree18b1b167bb165360b2b4799565330fca9ef9b689 /guix/scripts/package.scm
parent63e5ef402b66950b8fd24ba3808c022084cdb955 (diff)
downloadguix-patches-ad54a73bb820a685f242976a86be63931789fa97.tar
guix-patches-ad54a73bb820a685f242976a86be63931789fa97.tar.gz
guix build: Record package transformations in manifest entries.
With this change, package transformation options used while building a manifest are saved in the metadata of the manifest entries. * guix/scripts/build.scm (transformation-procedure): New procedure. (options->transformation)[applicable]: Use it. Change to a list of key/value/proc tuples instead of key/proc pairs. [package-with-transformation-properties, tagged-object]: New procedures. Use them. (package-transformations, manifest-entry-with-transformations): New procedures. * guix/scripts/pack.scm (guix-pack)[with-transformations]: New procedure. Use it. * guix/scripts/package.scm (process-actions)[transform-entry]: Use it. * tests/guix-package-aliases.sh: Add test.
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 7e7c37eac4..83f8c123d9 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -864,12 +864,13 @@ processed, #f otherwise."
(define (transform-entry entry)
(let ((item (transform store (manifest-entry-item entry))))
- (manifest-entry
- (inherit entry)
- (item item)
- (version (if (package? item)
- (package-version item)
- (manifest-entry-version entry))))))
+ (manifest-entry-with-transformations
+ (manifest-entry
+ (inherit entry)
+ (item item)
+ (version (if (package? item)
+ (package-version item)
+ (manifest-entry-version entry)))))))
(when (equal? profile %current-profile)
;; Normally the daemon created %CURRENT-PROFILE when we connected, unless