[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: gnu: usbutils: Add ‘python’ output.
From: |
guix-commits |
Subject: |
03/03: gnu: usbutils: Add ‘python’ output. |
Date: |
Wed, 8 May 2019 19:15:07 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 429a38a0093cf054cbc504225ce481c7ef6481cc
Author: Tobias Geerinckx-Rice <address@hidden>
Date: Thu May 9 01:08:08 2019 +0200
gnu: usbutils: Add ‘python’ output.
* gnu/packages/linux.scm (usbutils)[outputs]: Add ‘python’.
[arguments]: Add ‘separate-python-output’ phase.
---
gnu/packages/linux.scm | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index d7d9b46..f9ad6c5 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -824,6 +824,7 @@ slabtop, and skill.")
(sha256
(base32 "0iiy0q7fzikavmdsjsb0sl9kp3gfh701qwyjjccvqh0qz4jlcqw8"))))
(build-system gnu-build-system)
+ (outputs (list "out" "python"))
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -835,7 +836,19 @@ slabtop, and skill.")
;; Don't let autogen.sh run configure with bogus options & CFLAGS.
(substitute* "autogen.sh"
(("^\\./configure.*") ""))
- #t)))))
+ #t))
+ (add-after 'install 'separate-python-output
+ ;; Separating one Python script shaves more than 106 MiB from :out.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (out:python (assoc-ref outputs "python")))
+ (for-each (lambda (file)
+ (let ((old (string-append out "/" file))
+ (new (string-append out:python "/" file)))
+ (mkdir-p (dirname new))
+ (rename-file old new)))
+ (list "bin/lsusb.py"))
+ #t))))))
(inputs
`(("eudev" ,eudev)
("libusb" ,libusb)