diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-01-11 16:01:49 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-01-11 16:01:49 +0100 |
commit | 01e354eb83299d00ddd6ba4beb73bac8130beeae (patch) | |
tree | 03368edd8462d818334bec458cd04dc1de4750a1 /guix/build-system | |
parent | bfe384cc4c7e56ac1eceff8b5d92e916507436eb (diff) | |
parent | 28e55604212c01884a77a4f5eb66294c4957c48a (diff) | |
download | guix-patches-01e354eb83299d00ddd6ba4beb73bac8130beeae.tar guix-patches-01e354eb83299d00ddd6ba4beb73bac8130beeae.tar.gz |
Merge branch 'core-updates'
Conflicts:
guix/build/union.scm
Diffstat (limited to 'guix/build-system')
-rw-r--r-- | guix/build-system/gnu.scm | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index 4d247b04e1..a3a770f631 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -21,6 +21,7 @@ #:use-module (guix utils) #:use-module (guix derivations) #:use-module (guix build-system) + #:use-module (guix build-system gnu) #:use-module (guix packages) #:use-module (srfi srfi-1) #:use-module (srfi srfi-39) @@ -29,7 +30,8 @@ gnu-build-system package-with-explicit-inputs package-with-extra-configure-variable - static-libgcc-package)) + static-libgcc-package + static-package)) ;; Commentary: ;; @@ -117,6 +119,28 @@ configure flags for VARIABLE, the associated value is augmented." "A version of P linked with `-static-gcc'." (package-with-extra-configure-variable p "LDFLAGS" "-static-libgcc")) +(define* (static-package p #:optional (loc (current-source-location))) + "Return a statically-linked version of package P." + (let ((args (package-arguments p))) + (package (inherit p) + (location (source-properties->location loc)) + (arguments + (let ((augment (lambda (args) + (let ((a (default-keyword-arguments args + '(#:configure-flags '() + #:strip-flags #f)))) + (substitute-keyword-arguments a + ((#:configure-flags flags) + `(cons* "--disable-shared" + "LDFLAGS=-static" + ,flags)) + ((#:strip-flags _) + ''("--strip-all"))))))) + (if (procedure? args) + (lambda x + (augment (apply args x))) + (augment args))))))) + (define %store ;; Store passed to STANDARD-INPUTS. @@ -152,6 +176,7 @@ System: GCC, GNU Make, Bash, Coreutils, etc." (out-of-source? #f) (path-exclusions ''()) (tests? #t) + (test-target "check") (parallel-build? #t) (parallel-tests? #t) (patch-shebangs? #t) (strip-binaries? #t) @@ -193,6 +218,7 @@ which could lead to gratuitous input divergence." #:out-of-source? ,out-of-source? #:path-exclusions ,path-exclusions #:tests? ,tests? + #:test-target ,test-target #:parallel-build? ,parallel-build? #:parallel-tests? ,parallel-tests? #:patch-shebangs? ,patch-shebangs? |