guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/3] gnu: btrfs-progs: Add "static" output.


From: Tobias Geerinckx-Rice
Subject: [PATCH 3/3] gnu: btrfs-progs: Add "static" output.
Date: Sat, 2 Apr 2016 15:29:34 +0200

* gnu/packages/linux.scm (btrfs-progs)[outputs]: New field.
  [inputs]: Add "static" outputs of util-linux for libuuid and libblkid.
  [arguments]: Add 'build-static and 'install-static phases.
---
 gnu/packages/linux.scm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 0260b0e..a3f61c2 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2507,12 +2507,26 @@ and copy/paste text in the console and in xterm.")
                (base32
                 "1znf2zhb56zbmdjk3lq107678xwsqwc5gczspypmc5i31qnppy7f"))))
     (build-system gnu-build-system)
+    (outputs '("out"
+               "static"))      ; static versions of binaries in "out" (~16MiB!)
     (arguments
-     '(#:test-target "test"
+     '(#:phases (modify-phases %standard-phases
+                 (add-after 'build 'build-static
+                   (lambda _ (zero? (system* "make" "static"))))
+                 (add-after 'install 'install-static
+                   (let ((staticbin (string-append (assoc-ref %outputs 
"static")
+                                                  "/bin")))
+                     (lambda _
+                       (zero? (system* "make"
+                                       (string-append "bindir=" staticbin)
+                                       "install-static"))))))
+       #:test-target "test"
        #:parallel-tests? #f)) ; tests fail when run in parallel
     (inputs `(("e2fsprogs" ,e2fsprogs)
               ("libblkid" ,util-linux)
+              ("libblkid:static" ,util-linux "static")
               ("libuuid" ,util-linux)
+              ("libuuid:static" ,util-linux "static")
               ("zlib" ,zlib)
               ("lzo" ,lzo)))
     (native-inputs `(("pkg-config" ,pkg-config)
-- 
2.7.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]