1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cython, 6 numpy, 7 setuptools, 8 wheel, 9 imagecodecs, 10 matplotlib, 11 pandas, 12 pynrrd, 13 scipy, 14 sdflit, 15 seaborn, 16 tifffile, 17 tqdm, 18 typing-extensions, 19 beautifulsoup4, 20 certifi, 21 chardet, 22 lmdb, 23 requests, 24 urllib3, 25 pytestCheckHook, 26}: 27 28let 29 version = "0.19.4"; 30in 31buildPythonPackage rec { 32 pname = "swcgeom"; 33 inherit version; 34 pyproject = true; 35 36 src = fetchFromGitHub { 37 owner = "yzx9"; 38 repo = "swcgeom"; 39 tag = "v${version}"; 40 hash = "sha256-emffSI4LO+5UU267d+qj/NCVvHmRpzikJ7jdCOtPFNo="; 41 }; 42 43 build-system = [ 44 cython 45 numpy 46 setuptools 47 wheel 48 ]; 49 50 dependencies = [ 51 imagecodecs 52 matplotlib 53 numpy 54 pandas 55 pynrrd 56 scipy 57 sdflit 58 seaborn 59 tifffile 60 tqdm 61 typing-extensions 62 ]; 63 64 optional-dependencies = { 65 all = [ 66 beautifulsoup4 67 certifi 68 chardet 69 lmdb 70 requests 71 urllib3 72 ]; 73 }; 74 75 pythonImportsCheck = [ 76 "swcgeom" 77 ]; 78 79 nativeCheckInputs = [ 80 pytestCheckHook 81 ]; 82 83 preCheck = '' 84 # make sure import the built version, not the source one 85 rm -r swcgeom 86 ''; 87 88 meta = { 89 description = "Neuron geometry library for swc format"; 90 homepage = "https://github.com/yzx9/swcgeom"; 91 changelog = "https://github.com/yzx9/swcgeom/blob/${src.tag}/CHANGELOG.md"; 92 license = lib.licenses.asl20; 93 maintainers = with lib.maintainers; [ yzx9 ]; 94 }; 95}