mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
guix: Rewrite build-docker-image to allow more paths.
* guix/docker.scm (build-docker-image): Rename "path" argument to "prefix" to reflect the fact that it is used as a prefix for the symlink targets. Add the "paths" argument, and remove the "closure" argument, since it is now redundant. Add a "transformations" argument. * guix/scripts/pack.scm (docker-image): Read the profile's reference graph and provide its paths to build-docker-image via the new "paths" argument.
This commit is contained in:
parent
8c9bf2946a
commit
1c2ac6b482
2 changed files with 123 additions and 76 deletions
|
@ -238,6 +238,7 @@ the image."
|
|||
(define build
|
||||
(with-imported-modules `(,@(source-module-closure '((guix docker))
|
||||
#:select? not-config?)
|
||||
(guix build store-copy)
|
||||
((guix config) => ,config))
|
||||
#~(begin
|
||||
;; Guile-JSON is required by (guix docker).
|
||||
|
@ -245,13 +246,15 @@ the image."
|
|||
(string-append #+json "/share/guile/site/"
|
||||
(effective-version)))
|
||||
|
||||
(use-modules (guix docker) (srfi srfi-19))
|
||||
(use-modules (guix docker) (srfi srfi-19) (guix build store-copy))
|
||||
|
||||
(setenv "PATH" (string-append #$tar "/bin"))
|
||||
|
||||
(build-docker-image #$output #$profile
|
||||
(build-docker-image #$output
|
||||
(call-with-input-file "profile"
|
||||
read-reference-graph)
|
||||
#$profile
|
||||
#:system (or #$target (utsname:machine (uname)))
|
||||
#:closure "profile"
|
||||
#:symlinks '#$symlinks
|
||||
#:compressor '#$(compressor-command compressor)
|
||||
#:creation-time (make-time time-utc 0 1)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue