pack: Do not cross-compile the image building tools.
Until now, something like: guix pack -f docker --target=arm-linux-gnueabihf would attempt to cross-compile tar. * guix/scripts/pack.scm (self-contained-tarball): Pass #:target to 'gexp->derivation'. (squashfs-image): Use #+ instead of #$ for ARCHIVER. Use 'file-append' instead of 'string-append'. Pass #:target to 'gexp->derivation'. (docker-image): Likewise.master
parent
19e8a75418
commit
a89df83c79
|
@ -286,6 +286,7 @@ added to the pack."
|
||||||
(gexp->derivation (string-append name ".tar"
|
(gexp->derivation (string-append name ".tar"
|
||||||
(compressor-extension compressor))
|
(compressor-extension compressor))
|
||||||
build
|
build
|
||||||
|
#:target target
|
||||||
#:references-graphs `(("profile" ,profile))))
|
#:references-graphs `(("profile" ,profile))))
|
||||||
|
|
||||||
(define (singularity-environment-file profile)
|
(define (singularity-environment-file profile)
|
||||||
|
@ -384,7 +385,7 @@ added to the pack."
|
||||||
;; Reset all UIDs and GIDs.
|
;; Reset all UIDs and GIDs.
|
||||||
"-force-uid" "0" "-force-gid" "0")))
|
"-force-uid" "0" "-force-gid" "0")))
|
||||||
|
|
||||||
(setenv "PATH" (string-append #$archiver "/bin"))
|
(setenv "PATH" #+(file-append archiver "/bin"))
|
||||||
|
|
||||||
;; We need an empty file in order to have a valid file argument when
|
;; We need an empty file in order to have a valid file argument when
|
||||||
;; we reparent the root file system. Read on for why that's
|
;; we reparent the root file system. Read on for why that's
|
||||||
|
@ -484,6 +485,7 @@ added to the pack."
|
||||||
(compressor-extension compressor)
|
(compressor-extension compressor)
|
||||||
".squashfs")
|
".squashfs")
|
||||||
build
|
build
|
||||||
|
#:target target
|
||||||
#:references-graphs `(("profile" ,profile))))
|
#:references-graphs `(("profile" ,profile))))
|
||||||
|
|
||||||
(define* (docker-image name profile
|
(define* (docker-image name profile
|
||||||
|
@ -558,7 +560,7 @@ the image."
|
||||||
((_) str)
|
((_) str)
|
||||||
((names ... _) (loop names))))))) ;drop one entry
|
((names ... _) (loop names))))))) ;drop one entry
|
||||||
|
|
||||||
(setenv "PATH" (string-append #$archiver "/bin"))
|
(setenv "PATH" #+(file-append archiver "/bin"))
|
||||||
|
|
||||||
(build-docker-image #$output
|
(build-docker-image #$output
|
||||||
(map store-info-item
|
(map store-info-item
|
||||||
|
@ -574,12 +576,13 @@ the image."
|
||||||
#~(list (string-append #$profile "/"
|
#~(list (string-append #$profile "/"
|
||||||
#$entry-point)))
|
#$entry-point)))
|
||||||
#:extra-files directives
|
#:extra-files directives
|
||||||
#:compressor '#$(compressor-command compressor)
|
#:compressor '#+(compressor-command compressor)
|
||||||
#:creation-time (make-time time-utc 0 1))))))
|
#:creation-time (make-time time-utc 0 1))))))
|
||||||
|
|
||||||
(gexp->derivation (string-append name ".tar"
|
(gexp->derivation (string-append name ".tar"
|
||||||
(compressor-extension compressor))
|
(compressor-extension compressor))
|
||||||
build
|
build
|
||||||
|
#:target target
|
||||||
#:references-graphs `(("profile" ,profile))))
|
#:references-graphs `(("profile" ,profile))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue