2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
colorama,
|
|
|
|
fetchFromGitHub,
|
|
|
|
networkx,
|
|
|
|
numpy,
|
|
|
|
pytest-lazy-fixture,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
typeguard,
|
|
|
|
versioneer,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-10-19 13:55:26 +00:00
|
|
|
pname = "monai-deploy";
|
|
|
|
version = "0.5.1";
|
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Project-MONAI";
|
|
|
|
repo = "monai-deploy-app-sdk";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-a5WtU+1XjsYsXB/uZS8ufE0fOOWDf+Wy7mOX2xPEQEg=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Asked in https://github.com/Project-MONAI/monai-deploy-app-sdk/issues/450
|
|
|
|
# if this patch can be incorporated upstream.
|
2024-01-25 14:12:00 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
2024-09-19 14:19:46 +00:00
|
|
|
--replace-fail 'versioneer-518' 'versioneer'
|
2023-10-09 19:29:22 +00:00
|
|
|
'';
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [
|
2024-01-25 14:12:00 +00:00
|
|
|
versioneer
|
|
|
|
setuptools
|
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
dependencies = [
|
2023-05-24 13:37:59 +00:00
|
|
|
numpy
|
|
|
|
networkx
|
|
|
|
colorama
|
|
|
|
typeguard
|
|
|
|
];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-lazy-fixture
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabledTests = [
|
|
|
|
# requires Docker daemon:
|
|
|
|
"test_packager"
|
|
|
|
];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"monai.deploy"
|
|
|
|
"monai.deploy.core"
|
|
|
|
# "monai.deploy.operators" should be imported as well but
|
|
|
|
# requires some "optional" dependencies
|
2024-04-21 15:54:59 +00:00
|
|
|
# like highdicom and pydicom
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Framework and tools to design, develop and verify AI applications in healthcare imaging";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "monai-deploy";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://monai.io/deploy.html";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/Project-MONAI/monai-deploy-app-sdk/blob/main/docs/source/release_notes/v${version}.md";
|
2023-05-24 13:37:59 +00:00
|
|
|
license = licenses.asl20;
|
2024-01-25 14:12:00 +00:00
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
}
|