From 5e4242bed338e0f2a0913f00dde1c6529e9294f6 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Mon, 16 Feb 2026 18:22:34 +1300 Subject: [PATCH] linux-manual: fix for Linux 6.19 --- pkgs/by-name/li/linux-manual/package.nix | 39 +++++++++++------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/li/linux-manual/package.nix b/pkgs/by-name/li/linux-manual/package.nix index d16ed1c9e82f..d42d30fe531a 100644 --- a/pkgs/by-name/li/linux-manual/package.nix +++ b/pkgs/by-name/li/linux-manual/package.nix @@ -2,7 +2,6 @@ lib, stdenv, linuxPackages_latest, - perl, python3, man, }: @@ -11,39 +10,35 @@ stdenv.mkDerivation { pname = "linux-manual"; inherit (linuxPackages_latest.kernel) version src; - nativeBuildInputs = [ - perl - python3 - ]; + nativeBuildInputs = [ python3 ]; nativeInstallCheckInputs = [ man ]; dontConfigure = true; - dontBuild = true; doInstallCheck = true; postPatch = '' - # Use scripts/kernel-doc.py here, not scripts/kernel-doc because - # patchShebangs skips symlinks - + # Releases up to including 6.19.3 still use scripts/kernel-doc.py, but it + # has been moved to tools/docs with 7.0-rc1. patchShebangs --build \ - scripts/kernel-doc.py \ - scripts/split-man.pl + tools/docs \ + scripts/kernel-doc.py + ''; + + buildPhase = '' + runHook preBuild + + # avoid Makefile because it checks for unnecessary Python dependencies + KBUILD_BUILD_TIMESTAMP="$(date -u -d "@$SOURCE_DATE_EPOCH")" \ + tools/docs/sphinx-build-wrapper mandocs + + runHook postBuild ''; installPhase = '' runHook preInstall - export mandir="$out/share/man/man9" - mkdir -p "$mandir" - - KBUILD_BUILD_TIMESTAMP="$(date -u -d "@$SOURCE_DATE_EPOCH")" \ - grep -F -l -Z \ - --exclude-dir Documentation \ - --exclude-dir tools \ - -R '/**' \ - | xargs -0 -n 256 -P "$NIX_BUILD_CORES" \ - "$SHELL" -c '{ scripts/kernel-doc -man "$@" || :; } \ - | scripts/split-man.pl "$mandir"' kernel-doc + mkdir -p "$out/share/man" + cp -r output/man "$out/share/man/man9" runHook postInstall '';