summaryrefslogtreecommitdiff
path: root/guix/build-system/gnu.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-02-28 17:08:26 +0100
committerLudovic Courtès <ludo@gnu.org>2023-02-28 17:10:40 +0100
commit476741c5bbe92da4a1393724971036f1ada416da (patch)
tree83ea540c27359f85fe91520cea09937ac0675cfa /guix/build-system/gnu.scm
parent36ea77f5d7b8eb4b24079ba23d91be6e45457c1c (diff)
build-system/gnu: 'static-package' uses gexps.
* guix/build-system/gnu.scm (static-package): Use gexps.
Diffstat (limited to 'guix/build-system/gnu.scm')
-rw-r--r--guix/build-system/gnu.scm22
1 files changed, 10 insertions, 12 deletions
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index e37785010b..bb7552084c 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -1,5 +1,5 @@
;;; 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.
;;;
@@ -215,18 +215,16 @@ flags for VARIABLE, the associated value is augmented."
(define* (static-package p #:key (strip-all? #t))
"Return a statically-linked version of package P. If STRIP-ALL? is true,
use `--strip-all' as the arguments to `strip'."
- (package (inherit p)
+ (package
+ (inherit p)
(arguments
- (let ((a (default-keyword-arguments (package-arguments p)
- '(#:configure-flags '()
- #:strip-flags '("--strip-unneeded")))))
- (substitute-keyword-arguments a
- ((#:configure-flags flags)
- `(cons* "--disable-shared" "LDFLAGS=-static" ,flags))
- ((#:strip-flags flags)
- (if strip-all?
- ''("--strip-all")
- flags)))))
+ (substitute-keyword-arguments (package-arguments p)
+ ((#:configure-flags flags #~'())
+ #~(cons* "--disable-shared" "LDFLAGS=-static" #$flags))
+ ((#:strip-flags flags #~'("--strip-unneeded"))
+ (if strip-all?
+ #~'("--strip-all")
+ flags))))
(replacement (and=> (package-replacement p) static-package))))
(define* (dist-package p source #:key (phases '%dist-phases))