Paste number 309148: util-linux diff

Paste number 309148: util-linux diff
Pasted by: lfam
When:5 years, 8 months ago
Share:Tweet this! | http://paste.lisp.org/+6MJG
Channel:None
Paste contents:
Raw Source | XML | Display As
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 05f81e1..32f7710 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -440,11 +440,10 @@ providing the system administrator with some help in common tasks.")
                     (("build_kill=yes") "build_kill=no"))
                   #t))))
     (build-system gnu-build-system)
+    (outputs '("out" "static"))
     (arguments
      `(#:configure-flags (list "--disable-use-tty-group"
 
-                               ;; Do not build .a files to save 2 MiB.
-                               "--disable-static"
 
                                ;; Install completions where our
                                ;; bash-completion package expects them.
@@ -470,7 +469,18 @@ providing the system administrator with some help in common tasks.")
                        (substitute* "tests/ts/misc/mcookie"
                          (("/etc/services")
                           (string-append net "/etc/services")))
-                       #t))))))
+                       #t)))
+                  ;; 2 MiB of statically linked binaries
+                  (add-after 'install 'install-static
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((static (string-append
+                                       (assoc-ref outputs "static")
+                                       "/lib")))
+                        (for-each (lambda (file)
+                                    (system* "mv" file static))
+                                  (find-files "." "^\\./lib/.*\.a$"))
+                        #t)))
+                  )))
     (inputs `(("zlib" ,zlib)
               ("ncurses" ,ncurses)))
     (native-inputs

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.