summary refs log tree commit diff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2019-10-15 00:45:40 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2019-10-15 05:25:11 +0200
commitc78778e779127f4ec2d49d6ad1ed8cb0f9e8b96e (patch)
tree5c5380e0823dc50f793f04f7234ecd3edef90c39
parentfaa78e8850d7b025a13bd48e4ac0caefc77ba9cd (diff)
downloadguix-c78778e779127f4ec2d49d6ad1ed8cb0f9e8b96e.tar.gz
gnu: xfsprogs: Install Python script to :python output.
* gnu/packages/linux.scm (xfsprogs)[outputs]: Add ‘python’.
[arguments]: Move ‘xfs_scrub_all’ to :python.
[inputs]: Add python-wrapper to make it actually run.
-rw-r--r--gnu/packages/linux.scm25
1 files changed, 20 insertions, 5 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index ddbdd24fe4..989d55f8aa 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5864,15 +5864,30 @@ IP addresses and routes, and configure IPsec.")
                (base32
                 "0q5xd4gb9g83h82mg68cx616ifzl8qkzzlgg5xna698117ph3wky"))))
     (build-system gnu-build-system)
+    (outputs (list "out" "python"))
     (arguments
-     `(#:tests? #f    ;kernel/user integration tests are in package "xfstests"
-       #:phases (modify-phases %standard-phases
-                  (add-after 'install 'install-headers
-                    (lambda _
-                      (invoke "make" "install-dev"))))))
+     `(#:tests? #f   ; kernel/user integration tests are in package "xfstests"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'separate-python-output
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out    (assoc-ref outputs "out"))
+                   (python (assoc-ref outputs "python")))
+               (for-each
+                (lambda (script)
+                  (mkdir-p (string-append python (dirname script)))
+                  (rename-file (string-append out script)
+                               (string-append python script)))
+                (list "/sbin/xfs_scrub_all"))
+               #t)))
+         (add-after 'install 'install-headers
+           (lambda _
+             (invoke "make" "install-dev"))))))
     (native-inputs
      `(("gettext" ,gettext-minimal)
        ("util-linux" ,util-linux)))
+    (inputs
+     `(("python" ,python-wrapper)))
     (home-page "https://xfs.wiki.kernel.org/")
     (synopsis "XFS file system tools")
     (description "This package provides commands to create and check XFS