1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, setuptools
5, setuptools-scm
6, pytestCheckHook
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "dissect-cstruct";
12 version = "3.2";
13 format = "pyproject";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "fox-it";
19 repo = "dissect.cstruct";
20 rev = version;
21 hash = "sha256-iP00EcEkUWoYi+SCo/gY9LSVtCSQZ3g2wMs4Z8m+X2M=";
22 };
23
24 SETUPTOOLS_SCM_PRETEND_VERSION = version;
25
26 nativeBuildInputs = [
27 setuptools
28 setuptools-scm
29 ];
30
31 checkInputs = [
32 pytestCheckHook
33 ];
34
35 pythonImportsCheck = [
36 "dissect.cstruct"
37 ];
38
39 meta = with lib; {
40 description = "Dissect module implementing a parser for C-like structures";
41 homepage = "https://github.com/fox-it/dissect.cstruct";
42 license = licenses.agpl3Only;
43 maintainers = with maintainers; [ fab ];
44 };
45}