1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 cython, 7 numpy, 8 pbr, 9 fastremap, 10 pytestCheckHook, 11 scipy, 12}: 13 14buildPythonPackage rec { 15 pname = "connected-components-3d"; 16 version = "3.22.0"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "seung-lab"; 21 repo = "connected-components-3d"; 22 tag = version; 23 hash = "sha256-txgQY9k96hFKLrKVLE6ldPdNbSnKOk2FIMrHkRQXlPk="; 24 }; 25 26 build-system = [ 27 cython 28 numpy 29 pbr 30 setuptools 31 ]; 32 33 dependencies = [ numpy ]; 34 35 optional-dependencies = { 36 stack = [ 37 # crackle-codec # not in nixpkgs 38 fastremap 39 ]; 40 }; 41 42 nativeCheckInputs = [ 43 pytestCheckHook 44 scipy 45 ] 46 ++ optional-dependencies.stack; 47 48 disabledTests = [ 49 # requires optional dependency crackle-codec (not in nixpkgs) 50 "test_connected_components_stack" 51 ]; 52 53 pythonImportsCheck = [ "cc3d" ]; 54 55 meta = { 56 description = "Connected components on discrete and continuous multilabel 3D & 2D images"; 57 homepage = "https://github.com/seung-lab/connected-components-3d"; 58 changelog = "https://github.com/seung-lab/connected-components-3d/releases/tag/${version}"; 59 license = lib.licenses.lgpl3Plus; 60 maintainers = with lib.maintainers; [ bcdarwin ]; 61 }; 62}