17 src = fetchFromGitHub {
20 rev = "refs/tags/v${version}";
21 hash = "sha256-iJE1horEmdL7bKPn+NlZLgmtCbLZCZWQ8NjDBQPzXk8=";
24 # Pydicom needs pydicom-data to run some tests. If these files aren't downloaded
25 # before the package creation, it'll try to download during the checkPhase.
26 test_data = fetchFromGitHub {
28 repo = "pydicom-data";
29 rev = "cbb9b2148bccf0f550e3758c07aca3d0e328e768";
30 hash = "sha256-nF/j7pfcEpWHjjsqqTtIkW8hCEbuQ3J4IxpRk0qc1CQ=";
35 inherit pname version src;
38 disabled = pythonOlder "3.10";
41 # backport of https://github.com/pydicom/pydicom/commit/2513a20cc41743a42bdb86f4cbb4873899b7823c
42 ./pillow-10.1.0-compat.patch
49 propagatedBuildInputs = [
59 # Setting $HOME to prevent pytest to try to create a folder inside
60 # /homeless-shelter which is read-only.
61 # Linking pydicom-data dicom files to $HOME/.pydicom/data
63 export HOME=$TMP/test-home
64 mkdir -p $HOME/.pydicom/
65 ln -s ${test_data}/data_store/data $HOME/.pydicom/data
69 # tries to remove a dicom inside $HOME/.pydicom/data/ and download it again
70 "test_fetch_data_files"
71 ] ++ lib.optionals stdenv.isAarch64 [
72 # https://github.com/pydicom/pydicom/issues/1386
74 ] ++ lib.optionals stdenv.isDarwin [
75 # flaky, hard to reproduce failure outside hydra
79 pythonImportsCheck = [
84 description = "Python package for working with DICOM files";
85 mainProgram = "pydicom";
86 homepage = "https://pydicom.github.io";
87 changelog = "https://github.com/pydicom/pydicom/releases/tag/v${version}";
88 license = licenses.mit;
89 maintainers = with maintainers; [ bcdarwin ];