16 src = fetchFromGitHub {
20 hash = "sha256-CAQWaBkzecJ1VXQ5BnAUjmBMjh0I8y+gT7I4P4o2gqI=";
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 = "bbb723879690bb77e077a6d57657930998e92bd5";
29 hash = "sha256-dCI1temvpNWiWJYVfQZKy/YJ4ad5B0e9hEKHJnEeqzk=";
34 inherit pname version src;
35 disabled = pythonOlder "3.6";
37 format = "setuptools";
39 propagatedBuildInputs = [
49 # Setting $HOME to prevent pytest to try to create a folder inside
50 # /homeless-shelter which is read-only.
51 # Linking pydicom-data dicom files to $HOME/.pydicom/data
53 export HOME=$TMP/test-home
54 mkdir -p $HOME/.pydicom/
55 ln -s ${test_data}/data_store/data $HOME/.pydicom/data
59 # tries to remove a dicom inside $HOME/.pydicom/data/ and download it again
60 "test_fetch_data_files"
61 ] ++ lib.optionals stdenv.isAarch64 [
62 # https://github.com/pydicom/pydicom/issues/1386
64 ] ++ lib.optionals stdenv.isDarwin [
65 # flaky, hard to reproduce failure outside hydra
69 pythonImportsCheck = [
74 description = "Python package for working with DICOM files";
75 homepage = "https://pydicom.github.io";
76 license = licenses.mit;
77 maintainers = with maintainers; [ bcdarwin ];