Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.3 kB · 108 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, pytestCheckHook, numpy, pillow, pillow-jpls, pydicom, pylibjpeg, pylibjpeg-libjpeg, pylibjpeg-openjpeg, setuptools, typing-extensions,}:
let test_data = fetchFromGitHub { owner = "pydicom"; repo = "pydicom-data"; rev = "cbb9b2148bccf0f550e3758c07aca3d0e328e768"; hash = "sha256-nF/j7pfcEpWHjjsqqTtIkW8hCEbuQ3J4IxpRk0qc1CQ="; };inbuildPythonPackage rec { pname = "highdicom"; version = "0.25.1"; pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub { owner = "MGHComputationalPathology"; repo = "highdicom"; tag = "v${version}"; hash = "sha256-AwKaqCqPjLyNwXomV/pxijpsTQajekBO/rgLQJpuYww="; };
build-system = [ setuptools ];
dependencies = [ numpy pillow pillow-jpls pydicom typing-extensions ];
optional-dependencies = { libjpeg = [ pylibjpeg pylibjpeg-libjpeg pylibjpeg-openjpeg ]; };
pythonRemoveDeps = [ "pyjpegls" # not directly used ];
nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.libjpeg; preCheck = '' export HOME=$TMP/test-home mkdir -p $HOME/.pydicom/ ln -s ${test_data}/data_store/data $HOME/.pydicom/data '';
disabledTests = [ # require pyjpegls "test_jpegls_monochrome" "test_jpegls_rgb" "test_jpeglsnearlossless_monochrome" "test_jpeglsnearlossless_rgb" "test_multi_frame_sm_image_ushort_encapsulated_jpegls" "test_monochrome_jpegls" "test_monochrome_jpegls_near_lossless" "test_rgb_jpegls" "test_construction_autotile" "test_pixel_types_fractional" "test_pixel_types_labelmap" ];
pythonImportsCheck = [ "highdicom" "highdicom.legacy" "highdicom.ann" "highdicom.ko" "highdicom.pm" "highdicom.pr" "highdicom.seg" "highdicom.sr" "highdicom.sc" ];
# updates the wrong fetcher passthru.skipBulkUpdate = true;
meta = with lib; { description = "High-level DICOM abstractions for Python"; homepage = "https://highdicom.readthedocs.io"; changelog = "https://github.com/ImagingDataCommons/highdicom/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ bcdarwin ]; };}