Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchFromGitHub, 6 pytestCheckHook, 7 pythonOlder, 8 deprecated, 9 humanize, 10 matplotlib, 11 nibabel, 12 numpy, 13 parameterized, 14 scipy, 15 simpleitk, 16 torch, 17 tqdm, 18 typer, 19}: 20 21buildPythonPackage rec { 22 pname = "torchio"; 23 version = "0.19.6"; 24 pyproject = true; 25 26 disabled = pythonOlder "3.8"; 27 28 src = fetchFromGitHub { 29 owner = "fepegar"; 30 repo = "torchio"; 31 rev = "refs/tags/v${version}"; 32 hash = "sha256-FlsjDgthXDGVjj4L0Yw+8UzBROw9jiM4Z+qi67D5ygU="; 33 }; 34 35 propagatedBuildInputs = [ 36 deprecated 37 humanize 38 nibabel 39 numpy 40 scipy 41 simpleitk 42 torch 43 tqdm 44 typer 45 ]; 46 47 nativeCheckInputs = [ 48 pytestCheckHook 49 matplotlib 50 parameterized 51 ]; 52 disabledTests = 53 [ 54 # tries to download models: 55 "test_load_all" 56 ] 57 ++ lib.optionals stdenv.isAarch64 [ 58 # RuntimeError: DataLoader worker (pid(s) <...>) exited unexpectedly 59 "test_queue_multiprocessing" 60 ]; 61 pythonImportsCheck = [ 62 "torchio" 63 "torchio.data" 64 ]; 65 66 meta = with lib; { 67 description = "Medical imaging toolkit for deep learning"; 68 homepage = "https://torchio.readthedocs.io"; 69 license = licenses.asl20; 70 maintainers = [ maintainers.bcdarwin ]; 71 }; 72}