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 = "3.14";
14 pyproject = true;
15
16 disabled = pythonOlder "3.9";
17
18 src = fetchFromGitHub {
19 owner = "fox-it";
20 repo = "dissect.cstruct";
21 rev = "refs/tags/${version}";
22 hash = "sha256-Et6Pb7iRVlxcrR4gZf+5h7mVikf7CyDd7N+q4TH18vg=";
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/${version}";
38 license = licenses.agpl3Only;
39 maintainers = with maintainers; [ fab ];
40 };
41}