7 python = python3.override {
9 packageOverrides = final: prev: {
10 markdown-it-py = prev.markdown-it-py.overridePythonAttrs (_: {
13 mdit-py-plugins = prev.mdit-py-plugins.overridePythonAttrs (_: {
20 python.pkgs.buildPythonApplication rec {
21 pname = "nixos-render-docs";
25 src = lib.cleanSourceWith {
27 lib.cleanSourceFilter name type
28 && ! (type == "directory"
39 nativeBuildInputs = with python.pkgs; [
44 propagatedBuildInputs = with python.pkgs; [
49 pytestFlagsArray = [ "-vvrP" "tests/" ];
51 # NOTE this is a CI test rather than a build-time test because we want to keep the
52 # build closures small. mypy has an unreasonably large build closure for docs builds.
53 passthru.tests.typing = runCommand "${pname}-mypy" {
55 (python3.withPackages (ps: with ps; [ mypy pytest markdown-it-py mdit-py-plugins ]))
63 description = "Renderer for NixOS manual and option docs";
64 mainProgram = "nixos-render-docs";
65 license = licenses.mit;