1{ 2 lib, 3 stdenv, 4 arrow, 5 buildPythonPackage, 6 cloudpickle, 7 cryptography, 8 fetchFromGitHub, 9 lz4, 10 numpy, 11 pytestCheckHook, 12 pythonOlder, 13 ruamel-yaml, 14 setuptools, 15}: 16 17buildPythonPackage rec { 18 pname = "construct"; 19 version = "2.10.70"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.6"; 23 24 src = fetchFromGitHub { 25 owner = "construct"; 26 repo = "construct"; 27 rev = "refs/tags/v${version}"; 28 hash = "sha256-5otjjIyje0+z/Y/C2ivmu08PNm0oJcSSvZkQfGxHDuQ="; 29 }; 30 31 nativeBuildInputs = [ setuptools ]; 32 33 propagatedBuildInputs = [ 34 # Not an explicit dependency, but it's imported by an entrypoint 35 lz4 36 ]; 37 38 passthru.optional-dependencies = { 39 extras = [ 40 arrow 41 cloudpickle 42 cryptography 43 numpy 44 ruamel-yaml 45 ]; 46 }; 47 48 nativeCheckInputs = [ 49 pytestCheckHook 50 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 51 52 pythonImportsCheck = [ "construct" ]; 53 54 disabledTests = [ "test_benchmarks" ] ++ lib.optionals stdenv.isDarwin [ "test_multiprocessing" ]; 55 56 meta = with lib; { 57 description = "Powerful declarative parser (and builder) for binary data"; 58 homepage = "https://construct.readthedocs.org/"; 59 changelog = "https://github.com/construct/construct/releases/tag/v${version}"; 60 license = licenses.mit; 61 maintainers = with maintainers; [ bjornfor ]; 62 }; 63}