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 ] ++ optional-dependencies.stack; 46 47 disabledTests = [ 48 # requires optional dependency crackle-codec (not in nixpkgs) 49 "test_connected_components_stack" 50 ]; 51 52 pythonImportsCheck = [ "cc3d" ]; 53 54 meta = { 55 description = "Connected components on discrete and continuous multilabel 3D & 2D images"; 56 homepage = "https://github.com/seung-lab/connected-components-3d"; 57 changelog = "https://github.com/seung-lab/connected-components-3d/releases/tag/${version}"; 58 license = lib.licenses.lgpl3Plus; 59 maintainers = with lib.maintainers; [ bcdarwin ]; 60 }; 61}