man-pages: provide simple install check

This commit is contained in:
Mikael Voss
2025-02-15 23:16:04 +01:00
parent be2a5c11b6
commit 0bf2983951
+15
View File
@@ -3,6 +3,7 @@
stdenv,
fetchurl,
directoryListingUpdater,
man,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -14,8 +15,11 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-3aou2i6NKG++wiHRFfEtP/9dNsxQZs3+zI0koljVixk=";
};
nativeInstallCheckInputs = [ man ];
dontBuild = true;
enableParallelInstalling = true;
doInstallCheck = true;
makeFlags = [
"-R"
@@ -33,6 +37,17 @@ stdenv.mkDerivation (finalAttrs: {
export DISTDATE="$(date --utc --date="@$SOURCE_DATE_EPOCH")"
'';
installCheckPhase = ''
runHook preInstallCheck
# Check for a few wellknown man pages
for page in ldd write printf null hosts random ld.so; do
man -M "$out/share/man" -P cat "$page" >/dev/null
done
runHook postInstallCheck
'';
passthru.updateScript = directoryListingUpdater {
url = "https://www.kernel.org/pub/linux/docs/man-pages/";
};