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 | |
| parent | f93605b32b2e356422cde043ea0f0ec3f7ac229d (diff) | |
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.
| -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 9445dd82d65..68f06917c6b 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm | |||
| @@ -405,15 +405,11 @@ operability and find drivers.") | |||
| 405 | (invoke "make" "doc"))) | 405 | (invoke "make" "doc"))) |
| 406 | (add-after 'install 'install-man-pages | 406 | (add-after 'install 'install-man-pages |
| 407 | (lambda _ | 407 | (lambda _ |
| 408 | (let* ((man (string-append #$output "/share/man")) | 408 | (for-each |
| 409 | (man1 (string-append man "/man1")) | 409 | (lambda (file) |
| 410 | (man8 (string-append man "/man8"))) | 410 | (install-file file (string-append #$output "/share/man/man" |
| 411 | (for-each | 411 | (string-take-right file 1)))) |
| 412 | (lambda (x) (install-file x man1)) | 412 | (find-files "doc" "\\.[0-9]$"))))))) |
| 413 | (find-files "doc" "\\.1$")) | ||
| 414 | (for-each | ||
| 415 | (lambda (y) (install-file y man8)) | ||
| 416 | (find-files "doc" "\\.8$")))))))) | ||
| 417 | (native-inputs | 413 | (native-inputs |
| 418 | (list doxygen flex perl pkg-config)) | 414 | (list doxygen flex perl pkg-config)) |
| 419 | (inputs | 415 | (inputs |
