nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 llvmPackages_20,
7 libclang,
8 sphinx,
9 pytestCheckHook,
10 strictyaml,
11}:
12let
13 libclang_20 = libclang.override {
14 llvmPackages = llvmPackages_20;
15 };
16
17in
18buildPythonPackage rec {
19 pname = "hawkmoth";
20 version = "0.22.0";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "jnikula";
25 repo = "hawkmoth";
26 tag = "v${version}";
27 hash = "sha256-iFyTayPC4TWOfTZrfJJILJyi5BWrsVLwnSFnSeMpB2c=";
28 };
29
30 build-system = [ hatchling ];
31
32 dependencies = [
33 libclang_20
34 sphinx
35 ];
36 propagatedBuildInputs = [ llvmPackages_20.clang ];
37
38 nativeCheckInputs = [
39 llvmPackages_20.clang
40 pytestCheckHook
41 strictyaml
42 ];
43 pythonImportsCheck = [ "hawkmoth" ];
44
45 meta = {
46 description = "Sphinx Autodoc for C";
47 homepage = "https://jnikula.github.io/hawkmoth/";
48 changelog = "https://github.com/jnikula/hawkmoth/blob/${src.tag}/CHANGELOG.rst";
49 license = lib.licenses.bsd2;
50 maintainers = [ lib.maintainers.cynerd ];
51 };
52}