16 src = fetchFromGitHub {
19 rev = "refs/tags/v${version}";
20 hash = "sha256-PF4iA/FPxPYD8OfgWqKRndwi2vURuzh6tlEwduxs/3E=";
23 # Pydicom needs pydicom-data to run some tests. If these files aren't downloaded
24 # before the package creation, it'll try to download during the checkPhase.
25 test_data = fetchFromGitHub {
27 repo = "pydicom-data";
28 rev = "cbb9b2148bccf0f550e3758c07aca3d0e328e768";
29 hash = "sha256-nF/j7pfcEpWHjjsqqTtIkW8hCEbuQ3J4IxpRk0qc1CQ=";
34 inherit pname version src;
35 disabled = pythonOlder "3.6";
37 format = "setuptools";
40 # backport of https://github.com/pydicom/pydicom/commit/2513a20cc41743a42bdb86f4cbb4873899b7823c
41 ./pillow-10.1.0-compat.patch
44 propagatedBuildInputs = [
54 # Setting $HOME to prevent pytest to try to create a folder inside
55 # /homeless-shelter which is read-only.
56 # Linking pydicom-data dicom files to $HOME/.pydicom/data
58 export HOME=$TMP/test-home
59 mkdir -p $HOME/.pydicom/
60 ln -s ${test_data}/data_store/data $HOME/.pydicom/data
64 # tries to remove a dicom inside $HOME/.pydicom/data/ and download it again
65 "test_fetch_data_files"
66 ] ++ lib.optionals stdenv.isAarch64 [
67 # https://github.com/pydicom/pydicom/issues/1386
69 ] ++ lib.optionals stdenv.isDarwin [
70 # flaky, hard to reproduce failure outside hydra
74 pythonImportsCheck = [
79 description = "Python package for working with DICOM files";
80 homepage = "https://pydicom.github.io";
81 license = licenses.mit;
82 maintainers = with maintainers; [ bcdarwin ];