summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2021-10-23 16:48:39 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2021-10-23 16:49:36 +0200
commit5df03003e62748734781ed8425b2aeceba256652 (patch)
tree84ee746233888dbf0782bbfb296c3f8269bcd819 /gnu
parent1f5e6ff6486eefb0d035e27ca2059c780180bebd (diff)
downloadguix-5df03003e62748734781ed8425b2aeceba256652.tar.gz
gnu: bcachefs-tools-static: Fix build.
This follows up on commit 196e3f52355ee7d086e67eb769d714dd040d61c2:
bcachefs-tools now unconditionally builds and installs libbcachefs.so.

* gnu/packages/file-systems.scm (bcachefs-tools-static)[arguments]:
Add a new 'skip-shared-library phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/file-systems.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 32a6a33042..68488301b3 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -507,7 +507,17 @@ performance and other characteristics.")
       (substitute-keyword-arguments (package-arguments bcachefs-tools)
         ((#:make-flags make-flags)
          `(append ,make-flags
-                  (list "LDFLAGS=-static")))))
+                  (list "LDFLAGS=-static")))
+        ((#:phases phases)
+         `(modify-phases ,phases
+            (add-after 'unpack 'skip-shared-library
+              (lambda _
+                (substitute* "Makefile"
+                  ;; Building the shared library with ‘-static’ obviously fails…
+                  (("^((all|install):.*)\\blib\\b(.*)" _ prefix suffix)
+                   (string-append prefix suffix "\n"))
+                  ;; …as does installing a now non-existent file.
+                  ((".*\\$\\(INSTALL\\).* lib.*") ""))))))))
      (inputs
       `(("eudev:static" ,eudev "static")
         ("libscrypt:static" ,libscrypt "static")