summary refs log tree commit diff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-11-05 21:46:29 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2020-11-29 17:28:39 +0100
commit16611d1c95d78bb87ccca84ba806a4d279233dfb (patch)
treea22eece9ec37f88f3355fb7be489c0b4fc49258a
parent7c5f064277f5841a3c8d50e621a243d000055d20 (diff)
downloadguix-16611d1c95d78bb87ccca84ba806a4d279233dfb.tar.gz
gnu: Add bcachefs-static.
* gnu/packages/file-systems.scm (bcachefs/static): New public variable.
-rw-r--r--gnu/packages/file-systems.scm31
1 files changed, 31 insertions, 0 deletions
diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 8c382a0aec..7ace103a8e 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -404,6 +404,37 @@ performance and other characteristics.")
         ("zstd:static" ,zstd "static")
         ,@(package-inputs bcachefs-tools)))))
 
+(define-public bcachefs/static
+  (package
+    (name "bcachefs-static")
+    (version (package-version bcachefs-tools))
+    (build-system trivial-build-system)
+    (source #f)
+    (inputs
+     `(("bcachefs-tools" ,bcachefs-tools/static)))
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils)
+                      (ice-9 ftw)
+                      (srfi srfi-26))
+         (let* ((bcachefs-tools (assoc-ref %build-inputs "bcachefs-tools"))
+                (out (assoc-ref %outputs "out")))
+           (mkdir-p out)
+           (with-directory-excursion out
+             (install-file (string-append bcachefs-tools
+                                          "/sbin/bcachefs")
+                           "sbin")
+             (remove-store-references "sbin/bcachefs")
+             (invoke "sbin/bcachefs" "version") ; test suite
+             #t)))))
+    (home-page (package-home-page bcachefs-tools))
+    (synopsis "Statically-linked bcachefs command from bcachefs-tools")
+    (description "This package provides the statically-linked @command{bcachefs}
+from the bcachefs-tools package.  It is meant to be used in initrds.")
+    (license (package-license bcachefs-tools))))
+
 (define-public exfatprogs
   (package
     (name "exfatprogs")