mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
pack: Use let-keywords instead of keyword-ref.
* guix/scripts/pack.scm: (debian-archive): Bind extra-options keyword arguments via let-keywords.
This commit is contained in:
parent
068971805a
commit
5c099f496f
1 changed files with 42 additions and 51 deletions
|
@ -678,8 +678,7 @@ Valid compressors are: ~a~%") compressor-name %valid-compressors)))
|
||||||
(define data-tarball
|
(define data-tarball
|
||||||
(computed-file (string-append "data.tar"
|
(computed-file (string-append "data.tar"
|
||||||
(compressor-extension compressor))
|
(compressor-extension compressor))
|
||||||
(self-contained-tarball/builder
|
(self-contained-tarball/builder profile
|
||||||
profile
|
|
||||||
#:profile-name profile-name
|
#:profile-name profile-name
|
||||||
#:compressor compressor
|
#:compressor compressor
|
||||||
#:localstatedir? localstatedir?
|
#:localstatedir? localstatedir?
|
||||||
|
@ -702,6 +701,7 @@ Valid compressors are: ~a~%") compressor-name %valid-compressors)))
|
||||||
(guix build utils)
|
(guix build utils)
|
||||||
(guix profiles)
|
(guix profiles)
|
||||||
(ice-9 match)
|
(ice-9 match)
|
||||||
|
(ice-9 optargs)
|
||||||
(srfi srfi-1))
|
(srfi srfi-1))
|
||||||
|
|
||||||
(define machine-type
|
(define machine-type
|
||||||
|
@ -762,20 +762,11 @@ Valid compressors are: ~a~%") compressor-name %valid-compressors)))
|
||||||
|
|
||||||
(copy-file #+data-tarball data-tarball-file-name)
|
(copy-file #+data-tarball data-tarball-file-name)
|
||||||
|
|
||||||
(define (keyword-ref lst keyword)
|
|
||||||
(match (memq keyword lst)
|
|
||||||
((_ value . _) value)
|
|
||||||
(#f #f)))
|
|
||||||
|
|
||||||
;; Generate the control archive.
|
;; Generate the control archive.
|
||||||
(define control-file
|
(let-keywords '#$extra-options #f
|
||||||
(keyword-ref '#$extra-options #:control-file))
|
((control-file #f)
|
||||||
|
(postinst-file #f)
|
||||||
(define postinst-file
|
(triggers-file #f))
|
||||||
(keyword-ref '#$extra-options #:postinst-file))
|
|
||||||
|
|
||||||
(define triggers-file
|
|
||||||
(keyword-ref '#$extra-options #:triggers-file))
|
|
||||||
|
|
||||||
(define control-tarball-file-name
|
(define control-tarball-file-name
|
||||||
(string-append "control.tar"
|
(string-append "control.tar"
|
||||||
|
@ -818,7 +809,7 @@ Section: misc
|
||||||
;; Create the .deb archive using GNU ar.
|
;; Create the .deb archive using GNU ar.
|
||||||
(invoke (string-append #+binutils "/bin/ar") "-rv" #$output
|
(invoke (string-append #+binutils "/bin/ar") "-rv" #$output
|
||||||
"debian-binary"
|
"debian-binary"
|
||||||
control-tarball-file-name data-tarball-file-name)))))
|
control-tarball-file-name data-tarball-file-name))))))
|
||||||
|
|
||||||
(gexp->derivation (string-append name ".deb")
|
(gexp->derivation (string-append name ".deb")
|
||||||
build
|
build
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue