Skip to content

Commit 884b411

Browse files
committed
linux-manual: provide simple installation check
1 parent b26abf8 commit 884b411

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

pkgs/by-name/li/linux-manual/package.nix

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
{
22
lib,
33
stdenv,
4-
perl,
54
linuxPackages_latest,
5+
perl,
6+
man,
67
}:
78

89
stdenv.mkDerivation {
910
pname = "linux-manual";
1011
inherit (linuxPackages_latest.kernel) version src;
1112

1213
nativeBuildInputs = [ perl ];
14+
nativeInstallCheckInputs = [ man ];
1315

1416
dontConfigure = true;
1517
dontBuild = true;
18+
doInstallCheck = true;
1619

1720
postPatch = ''
1821
patchShebangs --build \
@@ -35,11 +38,18 @@ stdenv.mkDerivation {
3538
"$SHELL" -c '{ scripts/kernel-doc -man "$@" || :; } \
3639
| scripts/split-man.pl "$mandir"' kernel-doc
3740
38-
test -f "$mandir/kmalloc.9"
39-
4041
runHook postInstall
4142
'';
4243

44+
installCheckPhase = ''
45+
runHook preInstallCheck
46+
47+
# Check for well‐known man page
48+
man -M "$out/share/man" -P cat 9 kmalloc >/dev/null
49+
50+
runHook postInstallCheck
51+
'';
52+
4353
meta = {
4454
homepage = "https://kernel.org/";
4555
description = "Linux kernel API manual pages";

0 commit comments

Comments
 (0)