1{
2 lib,
3 stdenv,
4 graphviz,
5 imagemagick,
6 linux_latest,
7 makeFontsConf,
8 perl,
9 python3,
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 tools/net/ynl/pyynl/ynl_gen_rst.py
23 '';
24
25 FONTCONFIG_FILE = makeFontsConf {
26 fontDirectories = [ ];
27 };
28
29 nativeBuildInputs = [
30 graphviz
31 imagemagick
32 perl
33 python3.pkgs.sphinx
34 python3.pkgs.sphinx-rtd-theme
35 python3.pkgs.pyyaml
36 which
37 ];
38
39 preBuild = ''
40 export XDG_CACHE_HOME="$(mktemp -d)"
41 '';
42
43 makeFlags = [ "htmldocs" ];
44
45 installPhase = ''
46 mkdir -p $out/share/doc
47 mv Documentation/output $out/share/doc/linux-doc
48 cp -r Documentation/* $out/share/doc/linux-doc/
49 '';
50
51 meta = {
52 description = "Linux kernel html documentation";
53 homepage = "https://www.kernel.org/doc/htmldocs/";
54 platforms = lib.platforms.linux;
55 inherit (linux_latest.meta) license;
56 maintainers = with lib.maintainers; [ sigmanificient ];
57 };
58}