diff options
author | Tobias Geerinckx-Rice <me@tobias.gr> | 2023-07-16 02:00:00 +0200 |
---|---|---|
committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2023-07-16 02:00:02 +0200 |
commit | 84779e6271bdcde6033ad4339502e421b2efd1a4 (patch) | |
tree | 2171c55e6e4edb696cf7480da8514511fefed68f /gnu | |
parent | f93605b32b2e356422cde043ea0f0ec3f7ac229d (diff) | |
download | guix-84779e6271bdcde6033ad4339502e421b2efd1a4.tar.gz |
gnu: hwinfo: Factorise 'install-man-pages.
* gnu/packages/hardware.scm (hwinfo)[arguments]: Get section numbers from the man page file names rather than hard-coding 2.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/hardware.scm | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm index 9445dd82d6..68f06917c6 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm @@ -405,15 +405,11 @@ operability and find drivers.") (invoke "make" "doc"))) (add-after 'install 'install-man-pages (lambda _ - (let* ((man (string-append #$output "/share/man")) - (man1 (string-append man "/man1")) - (man8 (string-append man "/man8"))) - (for-each - (lambda (x) (install-file x man1)) - (find-files "doc" "\\.1$")) - (for-each - (lambda (y) (install-file y man8)) - (find-files "doc" "\\.8$")))))))) + (for-each + (lambda (file) + (install-file file (string-append #$output "/share/man/man" + (string-take-right file 1)))) + (find-files "doc" "\\.[0-9]$"))))))) (native-inputs (list doxygen flex perl pkg-config)) (inputs |