1{ lib
2, stdenv
3, graphviz
4, imagemagick
5, linux_latest
6, makeFontsConf
7, perl
8, python3
9, sphinx
10, which
11}:
12
13stdenv.mkDerivation {
14 pname = "linux-kernel-latest-htmldocs";
15
16 inherit (linux_latest) version src;
17
18 postPatch = ''
19 patchShebangs \
20 Documentation/sphinx/parse-headers.pl \
21 scripts/{get_abi.pl,get_feat.pl,kernel-doc,sphinx-pre-install}
22 '';
23
24 FONTCONFIG_FILE = makeFontsConf {
25 fontDirectories = [ ];
26 };
27
28 nativeBuildInputs = [
29 graphviz
30 imagemagick
31 perl
32 python3.pkgs.sphinx
33 python3.pkgs.sphinx-rtd-theme
34 which
35 ];
36
37 preBuild = ''
38 export XDG_CACHE_HOME="$(mktemp -d)"
39 '';
40
41 makeFlags = [ "htmldocs" ];
42
43 installPhase = ''
44 mkdir -p $out/share/doc
45 mv Documentation/output $out/share/doc/linux-doc
46 cp -r Documentation/* $out/share/doc/linux-doc/
47 '';
48
49 meta = with lib; {
50 description = "Linux kernel html documentation";
51 homepage = "https://www.kernel.org/doc/htmldocs/";
52 platforms = platforms.linux;
53 inherit (linux_latest.meta) license;
54 maintainers = with maintainers; [ ];
55 };
56}