about summary refs log tree commit diff
path: root/pkgs/data/documentation
diff options
context:
space:
mode:
authorMikael Voss <mvs@nyantec.com>2021-09-28 02:30:33 +0200
committerMikael Voss <mvs@nyantec.com>2021-10-25 12:35:33 +0200
commitfb4c3dec25deb30e57d5bb6b0bd3a3ed62d2c0a2 (patch)
treec318502d0e57fccd12858d470bcb6d408d3206aa /pkgs/data/documentation
parent44403b728b3869685fa8bceaa9e491f5b5ad5347 (diff)
linux-manual: init at 5.14.14
Diffstat (limited to 'pkgs/data/documentation')
-rw-r--r--pkgs/data/documentation/linux-manual/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/data/documentation/linux-manual/default.nix b/pkgs/data/documentation/linux-manual/default.nix
new file mode 100644
index 0000000000000..27690f9b99cd5
--- /dev/null
+++ b/pkgs/data/documentation/linux-manual/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchurl, perl, linuxPackages_latest }:
+
+stdenv.mkDerivation rec {
+  pname = "linux-manual";
+  inherit (linuxPackages_latest.kernel) version src;
+
+  nativeBuildInputs = [ perl ];
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  postPatch = ''
+    patchShebangs --build \
+      scripts/kernel-doc \
+      scripts/split-man.pl
+  '';
+
+  installPhase = ''
+    mandir=$out/share/man/man9
+    mkdir -p $mandir
+
+    KBUILD_BUILD_TIMESTAMP=$(stat -c %Y Makefile) \
+    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
+
+    test -f $mandir/kmalloc.9
+  '';
+
+  meta = with lib; {
+    homepage = "https://kernel.org/";
+    description = "Linux kernel API manual pages";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ mvs ];
+  };
+}