Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 cython, 8 9 # optional 10 numpy, 11 12 # tests 13 hypothesis, 14 pytest-cov, 15 pytestCheckHook, 16}: 17 18buildPythonPackage rec { 19 pname = "ndindex"; 20 version = "1.8"; 21 format = "setuptools"; 22 23 src = fetchFromGitHub { 24 owner = "Quansight-Labs"; 25 repo = "ndindex"; 26 rev = "refs/tags/${version}"; 27 hash = "sha256-F52ly3NkrZ0H9XoomMqmWfLl+8X0z26Yx67DB8DUqyU="; 28 }; 29 30 nativeBuildInputs = [ cython ]; 31 32 postPatch = '' 33 substituteInPlace pytest.ini \ 34 --replace "--cov=ndindex/ --cov-report=term-missing --flakes" "" 35 ''; 36 37 passthru.optional-dependencies.arrays = [ numpy ]; 38 39 pythonImportsCheck = [ "ndindex" ]; 40 41 nativeCheckInputs = [ 42 hypothesis 43 pytest-cov # uses cov markers 44 pytestCheckHook 45 ] ++ passthru.optional-dependencies.arrays; 46 47 meta = with lib; { 48 description = ""; 49 homepage = "https://github.com/Quansight-Labs/ndindex"; 50 changelog = "https://github.com/Quansight-Labs/ndindex/releases/tag/${version}"; 51 license = licenses.mit; 52 maintainers = [ ]; 53 }; 54}