depot/third_party/nixpkgs/pkgs/development/python-modules/pydicom-seg/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

63 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
pythonOlder,
pytestCheckHook,
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;
};
patches = [
# https://github.com/razorx89/pydicom-seg/pull/54
(fetchpatch {
name = "replace-poetry-with-poetry-core.patch";
url = "https://github.com/razorx89/pydicom-seg/commit/ac91eaefe3b0aecfe745869972c08de5350d2b61.patch";
hash = "sha256-xBOVjWZPjyQ8gSj6JLe9B531e11TI3FUFFtL+IelZOM=";
})
];
pythonRelaxDeps = [ "jsonschema" ];
nativeBuildInputs = [
poetry-core
];
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 ];
};
}