at master 1.4 kB view raw
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 tag = "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 optional-dependencies = { 39 extras = [ 40 arrow 41 cloudpickle 42 cryptography 43 numpy 44 ruamel-yaml 45 ]; 46 }; 47 48 nativeCheckInputs = [ 49 pytestCheckHook 50 ] 51 ++ lib.flatten (builtins.attrValues optional-dependencies); 52 53 pythonImportsCheck = [ "construct" ]; 54 55 disabledTests = [ 56 "test_benchmarks" 57 ] 58 ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_multiprocessing" ]; 59 60 meta = with lib; { 61 description = "Powerful declarative parser (and builder) for binary data"; 62 homepage = "https://construct.readthedocs.org/"; 63 changelog = "https://github.com/construct/construct/releases/tag/v${version}"; 64 license = licenses.mit; 65 maintainers = with maintainers; [ bjornfor ]; 66 }; 67}