gnu: kmod: Modernize.

* gnu/packages/linux.scm (kmod) [native-inputs, inputs]: Remove labels.
[arguments]: Use gexps, remove trailing #t.

Change-Id: If40e25d38c5b4ac3cb192a76d688834069278c9d
This commit is contained in:
Maxim Cournoyer 2024-03-11 10:48:26 -04:00 committed by Ludovic Courtès
parent 687751d0d8
commit 93f34e3235
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -4330,37 +4330,27 @@ (define-public kmod
"0am54mi5rk72g5q7k6l6f36gw3r9vwgjmyna43ywcjhqmakyx00b"))
(patches (search-patches "kmod-module-directory.patch"))))
(build-system gnu-build-system)
(native-inputs
(list pkg-config
;; For tests.
zstd))
(inputs
`(("xz" ,xz)
("zlib" ,zlib)
("zstd-lib" ,zstd "lib")))
(arguments
`(#:configure-flags '("--with-xz" "--with-zlib" "--with-zstd"
"--disable-test-modules")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'disable-tests
(lambda _
;; XXX: These tests need '--sysconfdir=/etc' to pass.
(substitute* "Makefile.in"
(("testsuite/test-modprobe") "")
(("testsuite/test-depmod") "")
(("testsuite/test-blacklist") ""))
#t))
(add-after 'install 'install-modprobe&co
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(for-each (lambda (tool)
(symlink "kmod"
(string-append bin "/" tool)))
'("insmod" "rmmod" "lsmod" "modprobe"
"modinfo" "depmod"))
#t))))))
(list #:configure-flags #~(list "--with-xz" "--with-zlib" "--with-zstd"
"--disable-test-modules")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'disable-tests
(lambda _
;; XXX: These tests need '--sysconfdir=/etc' to pass.
(substitute* "Makefile.in"
(("testsuite/test-modprobe") "")
(("testsuite/test-depmod") "")
(("testsuite/test-blacklist") ""))))
(add-after 'install 'install-modprobe&co
(lambda _
(for-each (lambda (tool)
(symlink "kmod"
(string-append #$output "/bin/" tool)))
'("insmod" "rmmod" "lsmod" "modprobe"
"modinfo" "depmod")))))))
(native-inputs (list pkg-config zstd)) ;zstd needed for tests
(inputs (list xz zlib `(,zstd "lib")))
(supported-systems (delete "i586-gnu" %supported-systems))
(home-page "https://www.kernel.org/")
(synopsis "Kernel module tools")