2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
hatchling,
|
|
|
|
hatch-vcs,
|
|
|
|
anywidget,
|
|
|
|
pytestCheckHook,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ipyniivue";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.0.1";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-C0mYkguN4ZfxSLqETH3dUwXeoNcicrmAgp6e9IIT43s=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# We do not need the build hooks, because we do not need to
|
2023-10-09 19:29:22 +00:00
|
|
|
# build any JS components; these are present already in the PyPI artifact.
|
2024-04-21 15:54:59 +00:00
|
|
|
env.HATCH_BUILD_NO_HOOKS = true;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
2023-10-09 19:29:22 +00:00
|
|
|
hatchling
|
2024-05-15 15:35:15 +00:00
|
|
|
hatch-vcs
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [ anywidget ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
nativeCheckImports = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "ipyniivue" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Show a nifti image in a webgl 2.0 canvas within a jupyter notebook cell";
|
|
|
|
homepage = "https://github.com/niivue/ipyniivue";
|
|
|
|
changelog = "https://github.com/niivue/ipyniivue/releases/tag/${version}";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|