1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 setuptools-scm,
7 pytestCheckHook,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "dissect-cstruct";
13 version = "4.5";
14 pyproject = true;
15
16 disabled = pythonOlder "3.9";
17
18 src = fetchFromGitHub {
19 owner = "fox-it";
20 repo = "dissect.cstruct";
21 tag = version;
22 hash = "sha256-2n7y6nHt7gJtJeJIKpobiC7A+dnD6O/o+psinfOnvT8=";
23 };
24
25 build-system = [
26 setuptools
27 setuptools-scm
28 ];
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 pythonImportsCheck = [ "dissect.cstruct" ];
33
34 meta = with lib; {
35 description = "Dissect module implementing a parser for C-like structures";
36 homepage = "https://github.com/fox-it/dissect.cstruct";
37 changelog = "https://github.com/fox-it/dissect.cstruct/releases/tag/${src.tag}";
38 license = licenses.agpl3Only;
39 maintainers = with maintainers; [ fab ];
40 };
41}