1{ lib
2, stdenv
3, graphviz
4, imagemagick
5, linux_latest
6, makeFontsConf
7, perl
8, python3
9, which
10}:
11
12stdenv.mkDerivation {
13 pname = "linux-kernel-latest-htmldocs";
14
15 inherit (linux_latest) version src;
16
17 postPatch = ''
18 patchShebangs \
19 Documentation/sphinx/parse-headers.pl \
20 scripts/{get_abi.pl,get_feat.pl,kernel-doc,sphinx-pre-install} \
21 tools/net/ynl/ynl-gen-rst.py
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 python3.pkgs.pyyaml
35 which
36 ];
37
38 preBuild = ''
39 export XDG_CACHE_HOME="$(mktemp -d)"
40 '';
41
42 makeFlags = [ "htmldocs" ];
43
44 installPhase = ''
45 mkdir -p $out/share/doc
46 mv Documentation/output $out/share/doc/linux-doc
47 cp -r Documentation/* $out/share/doc/linux-doc/
48 '';
49
50 meta = {
51 description = "Linux kernel html documentation";
52 homepage = "https://www.kernel.org/doc/htmldocs/";
53 platforms = lib.platforms.linux;
54 inherit (linux_latest.meta) license;
55 maintainers = with lib.maintainers; [ sigmanificient ];
56 };
57}