1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5 pcpp,
6 pytestCheckHook,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "cxxheaderparser";
12 version = "1.6.0";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "robotpy";
17 repo = "cxxheaderparser";
18 rev = version;
19 hash = "sha256-3nQCUb2sgF91ilREHj/fb8IoMTHjPoOFWGzkbssGqFY=";
20 };
21
22 postPatch = ''
23 # version.py is generated based on latest git tag
24 echo "__version__ = '${version}'" > cxxheaderparser/version.py
25 '';
26
27 build-system = [ setuptools ];
28
29 checkInputs = [ pcpp ];
30 nativeCheckInputs = [ pytestCheckHook ];
31 pythonImportsCheck = [ "cxxheaderparser" ];
32
33 meta = {
34 description = "Modern pure python C++ header parser";
35 homepage = "https://github.com/robotpy/cxxheaderparser";
36 license = lib.licenses.bsd3;
37 maintainers = with lib.maintainers; [ nim65s ];
38 platforms = lib.platforms.unix;
39 };
40}