summary refs log tree commit diff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2021-09-22 22:53:24 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2021-09-23 18:17:17 +0200
commit2a9db30eec016e3d2198290df1f4e9add044c193 (patch)
tree8a45dd7728b27200f414e6037c14793db000b039
parent2b260efbfc035d4ce33f1ab6094f938e11c2c91d (diff)
downloadguix-2a9db30eec016e3d2198290df1f4e9add044c193.tar.gz
gnu: Add xfs_repair-static.
* gnu/packages/linux.scm (xfs_repair/static): New public variable.
-rw-r--r--gnu/packages/linux.scm26
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 08a3995c9c..63141da3ab 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -7756,6 +7756,32 @@ file systems.")
                  (package-inputs xfsprogs))))
     (synopsis "Statically linked XFS file system tools")))
 
+(define-public xfs_repair/static
+  (package
+    (name "xfs_repair-static")
+    (version (package-version xfsprogs/static))
+    (source #f)
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let* ((xfsprogs (assoc-ref %build-inputs "xfsprogs"))
+                (out      (assoc-ref %outputs "out"))
+                (sbin     (string-append out "/sbin")))
+           (install-file (string-append xfsprogs "/sbin/xfs_repair") sbin)
+           (with-directory-excursion sbin
+             (remove-store-references "xfs_repair"))))))
+    (inputs
+     `(("xfsprogs" ,xfsprogs/static)))
+    (home-page (package-home-page xfsprogs/static))
+    (synopsis "Statically linked @command{xfs_repair} from xfsprogs")
+    (description
+     "This package provides a statically linked @command{xfs_repair} taken
+from the xfsprogs package.  It is meant to be used in initrds.")
+    (license (package-license xfsprogs/static))))
+
 (define-public genext2fs
   (package
     (name "genext2fs")