2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
2022-09-09 14:08:57 +00:00
|
|
|
, appdirs
|
|
|
|
, build
|
2022-04-15 01:41:22 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-11-16 04:20:00 +00:00
|
|
|
, hatchling
|
|
|
|
, hatch-vcs
|
2022-04-15 01:41:22 +00:00
|
|
|
, magicgui
|
|
|
|
, napari # reverse dependency, for tests
|
2022-09-09 14:08:57 +00:00
|
|
|
, pydantic
|
|
|
|
, pythonOlder
|
|
|
|
, pytomlpp
|
|
|
|
, pyyaml
|
|
|
|
, rich
|
|
|
|
, typer
|
2022-04-15 01:41:22 +00:00
|
|
|
}:
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
buildPythonPackage rec {
|
2022-04-15 01:41:22 +00:00
|
|
|
pname = "napari-npe2";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.7.2";
|
|
|
|
pyproject = true;
|
2022-04-15 01:41:22 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "napari";
|
|
|
|
repo = "npe2";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-PjoLocNTkcAnBNRbPi+MZqZtQ2bjWPIUVz0+k8nIn2A=";
|
2022-04-15 01:41:22 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
hatchling
|
|
|
|
hatch-vcs
|
2022-04-15 01:41:22 +00:00
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
appdirs
|
2022-09-09 14:08:57 +00:00
|
|
|
build
|
2022-04-15 01:41:22 +00:00
|
|
|
magicgui
|
2022-09-09 14:08:57 +00:00
|
|
|
pydantic
|
|
|
|
pytomlpp
|
|
|
|
pyyaml
|
|
|
|
rich
|
2022-04-15 01:41:22 +00:00
|
|
|
typer
|
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"npe2"
|
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
passthru.tests = { inherit napari; };
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-09-09 14:08:57 +00:00
|
|
|
description = "Plugin system for napari (the image visualizer)";
|
2022-04-15 01:41:22 +00:00
|
|
|
homepage = "https://github.com/napari/npe2";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ SomeoneSerge ];
|
|
|
|
};
|
|
|
|
}
|