diff options
Diffstat (limited to 'pkgs/development/python-modules/pydicom-seg/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pydicom-seg/default.nix | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pydicom-seg/default.nix b/pkgs/development/python-modules/pydicom-seg/default.nix new file mode 100644 index 00000000000..c18c0210c86 --- /dev/null +++ b/pkgs/development/python-modules/pydicom-seg/default.nix @@ -0,0 +1,65 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, pythonRelaxDepsHook +, poetry-core +, jsonschema +, numpy +, pydicom +, simpleitk +}: + +buildPythonPackage rec { + pname = "pydicom-seg"; + version = "0.4.1"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "razorx89"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-2Y3fZHKfZqdp5EU8HfVsmJ5JFfVGZuAR7+Kj7qaTiPM="; + fetchSubmodules = true; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "poetry.masonry.api" "poetry.core.masonry.api" + ''; + + pythonRelaxDeps = [ + "jsonschema" + ]; + + nativeBuildInputs = [ + poetry-core + pythonRelaxDepsHook + ]; + + propagatedBuildInputs = [ + jsonschema + numpy + pydicom + simpleitk + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pydicom_seg" + ]; + + meta = with lib; { + description = "Medical segmentation file reading and writing"; + homepage = "https://github.com/razorx89/pydicom-seg"; + changelog = "https://github.com/razorx89/pydicom-seg/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ bcdarwin ]; + }; +} |