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.10"; 13 format = "pyproject"; 14 15 disabled = pythonOlder "3.10"; 16 17 src = fetchFromGitHub { 18 owner = "fox-it"; 19 repo = "dissect.cstruct"; 20 rev = "refs/tags/${version}"; 21 hash = "sha256-cdBojvFI0cN6mEZ98xLa3XldvIoR+Jv1c0/hvVkKVoQ="; 22 }; 23 24 SETUPTOOLS_SCM_PRETEND_VERSION = version; 25 26 nativeBuildInputs = [ 27 setuptools 28 setuptools-scm 29 ]; 30 31 nativeCheckInputs = [ 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 changelog = "https://github.com/fox-it/dissect.cstruct/releases/tag/${version}"; 43 license = licenses.agpl3Only; 44 maintainers = with maintainers; [ fab ]; 45 }; 46}