build-system/gnu: 'static-package' uses gexps.
* guix/build-system/gnu.scm (static-package): Use gexps.
This commit is contained in:
parent
36ea77f5d7
commit
476741c5bb
1 changed files with 10 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -215,18 +215,16 @@ flags for VARIABLE, the associated value is augmented."
|
||||||
(define* (static-package p #:key (strip-all? #t))
|
(define* (static-package p #:key (strip-all? #t))
|
||||||
"Return a statically-linked version of package P. If STRIP-ALL? is true,
|
"Return a statically-linked version of package P. If STRIP-ALL? is true,
|
||||||
use `--strip-all' as the arguments to `strip'."
|
use `--strip-all' as the arguments to `strip'."
|
||||||
(package (inherit p)
|
(package
|
||||||
|
(inherit p)
|
||||||
(arguments
|
(arguments
|
||||||
(let ((a (default-keyword-arguments (package-arguments p)
|
(substitute-keyword-arguments (package-arguments p)
|
||||||
'(#:configure-flags '()
|
((#:configure-flags flags #~'())
|
||||||
#:strip-flags '("--strip-unneeded")))))
|
#~(cons* "--disable-shared" "LDFLAGS=-static" #$flags))
|
||||||
(substitute-keyword-arguments a
|
((#:strip-flags flags #~'("--strip-unneeded"))
|
||||||
((#:configure-flags flags)
|
|
||||||
`(cons* "--disable-shared" "LDFLAGS=-static" ,flags))
|
|
||||||
((#:strip-flags flags)
|
|
||||||
(if strip-all?
|
(if strip-all?
|
||||||
''("--strip-all")
|
#~'("--strip-all")
|
||||||
flags)))))
|
flags))))
|
||||||
(replacement (and=> (package-replacement p) static-package))))
|
(replacement (and=> (package-replacement p) static-package))))
|
||||||
|
|
||||||
(define* (dist-package p source #:key (phases '%dist-phases))
|
(define* (dist-package p source #:key (phases '%dist-phases))
|
||||||
|
|
Reference in a new issue