diff options
author | Lily Foster <lily@lily.flowers> | 2023-04-14 13:13:15 -0400 |
---|---|---|
committer | Lily Foster <lily@lily.flowers> | 2023-04-16 09:17:25 -0400 |
commit | 188be504d7bf6fb8a3743a2d5e2aafe0d0a81805 (patch) | |
tree | d628d4e3564f20f64e1d635df8bf27f012483e4f /pkgs/development/tools/hotdoc | |
parent | 935974daa05eeedd4009e2971196650d0de9afd7 (diff) | |
download | nixlib-188be504d7bf6fb8a3743a2d5e2aafe0d0a81805.tar nixlib-188be504d7bf6fb8a3743a2d5e2aafe0d0a81805.tar.gz nixlib-188be504d7bf6fb8a3743a2d5e2aafe0d0a81805.tar.bz2 nixlib-188be504d7bf6fb8a3743a2d5e2aafe0d0a81805.tar.lz nixlib-188be504d7bf6fb8a3743a2d5e2aafe0d0a81805.tar.xz nixlib-188be504d7bf6fb8a3743a2d5e2aafe0d0a81805.tar.zst nixlib-188be504d7bf6fb8a3743a2d5e2aafe0d0a81805.zip |
hotdoc: init at 0.13.7
Diffstat (limited to 'pkgs/development/tools/hotdoc')
-rw-r--r-- | pkgs/development/tools/hotdoc/default.nix | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/pkgs/development/tools/hotdoc/default.nix b/pkgs/development/tools/hotdoc/default.nix new file mode 100644 index 000000000000..1b3f7d5f414d --- /dev/null +++ b/pkgs/development/tools/hotdoc/default.nix @@ -0,0 +1,112 @@ +{ lib +, buildPythonApplication +, fetchPypi +, pytestCheckHook +, pkg-config +, cmake +, flex +, glib +, json-glib +, libxml2 +, appdirs +, dbus-deviation +, faust-cchardet +, feedgen +, lxml +, networkx +, pkgconfig +, pyyaml +, schema +, setuptools +, toposort +, wheezy-template +, libclang +, gst_all_1 +}: + +buildPythonApplication rec { + pname = "hotdoc"; + version = "0.13.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-ESOmWeLJSXLDKBPsMBGR0zPbJHEqg/fj0G3VjUfPAJg="; + }; + + nativeBuildInputs = [ + pkg-config + cmake + flex + ]; + + buildInputs = [ + glib + json-glib + libxml2.dev + ]; + + propagatedBuildInputs = [ + appdirs + dbus-deviation + faust-cchardet + feedgen + lxml + networkx + pkgconfig + pyyaml + schema + setuptools # for pkg_resources + toposort + wheezy-template + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + # CMake is used to build CMARK, but the build system is still python + dontUseCmakeConfigure = true; + + # Ensure C+GI+GST extensions are built and can be imported + pythonImportsCheck = [ + "hotdoc.extensions.c.c_extension" + "hotdoc.extensions.gi.gi_extension" + "hotdoc.extensions.gst.gst_extension" + ]; + + # Run the tests by package instead of current dir + pytestFlagsArray = [ "--pyargs" "hotdoc" ]; + + disabledTests = [ + # Test does not correctly handle path normalization for test comparison + "test_cli_overrides" + ]; + + # Hardcode libclang paths + postPatch = '' + substituteInPlace hotdoc/extensions/c/c_extension.py \ + --replace "shutil.which('llvm-config')" 'True' \ + --replace "subprocess.check_output(['llvm-config', '--version']).strip().decode()" '"${libclang.version}"' \ + --replace "subprocess.check_output(['llvm-config', '--prefix']).strip().decode()" '"${libclang.lib}"' \ + --replace "subprocess.check_output(['llvm-config', '--libdir']).strip().decode()" '"${libclang.lib}/lib"' + ''; + + # Make pytest run from a temp dir to have it pick up installed package for cmark + preCheck = '' + pushd $TMPDIR + ''; + postCheck = '' + popd + ''; + + passthru.tests = { + inherit (gst_all_1) gstreamer gst-plugins-base; + }; + + meta = with lib; { + description = "The tastiest API documentation system"; + homepage = "https://hotdoc.github.io/"; + license = [ licenses.lgpl21Plus ]; + maintainers = with maintainers; [ lilyinstarlight ]; + }; +} |