linux-manual: provide simple installation check

This commit is contained in:
Mikael Voss
2025-02-11 11:20:45 +01:00
parent b26abf8002
commit 884b4116d2
+13 -3
View File
@@ -1,8 +1,9 @@
{
lib,
stdenv,
perl,
linuxPackages_latest,
perl,
man,
}:
stdenv.mkDerivation {
@@ -10,9 +11,11 @@ stdenv.mkDerivation {
inherit (linuxPackages_latest.kernel) version src;
nativeBuildInputs = [ perl ];
nativeInstallCheckInputs = [ man ];
dontConfigure = true;
dontBuild = true;
doInstallCheck = true;
postPatch = ''
patchShebangs --build \
@@ -35,11 +38,18 @@ stdenv.mkDerivation {
"$SHELL" -c '{ scripts/kernel-doc -man "$@" || :; } \
| scripts/split-man.pl "$mandir"' kernel-doc
test -f "$mandir/kmalloc.9"
runHook postInstall
'';
installCheckPhase = ''
runHook preInstallCheck
# Check for wellknown man page
man -M "$out/share/man" -P cat 9 kmalloc >/dev/null
runHook postInstallCheck
'';
meta = {
homepage = "https://kernel.org/";
description = "Linux kernel API manual pages";