1{ lib
2, appdirs
3, build
4, buildPythonPackage
5, fetchFromGitHub
6, hatchling
7, hatch-vcs
8, magicgui
9, napari # reverse dependency, for tests
10, pydantic
11, pythonOlder
12, pytomlpp
13, pyyaml
14, rich
15, typer
16}:
17
18buildPythonPackage rec {
19 pname = "napari-npe2";
20 version = "0.7.2";
21 pyproject = true;
22
23 disabled = pythonOlder "3.8";
24
25 src = fetchFromGitHub {
26 owner = "napari";
27 repo = "npe2";
28 rev = "refs/tags/v${version}";
29 hash = "sha256-PjoLocNTkcAnBNRbPi+MZqZtQ2bjWPIUVz0+k8nIn2A=";
30 };
31
32 env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
33
34 nativeBuildInputs = [
35 hatchling
36 hatch-vcs
37 ];
38
39 propagatedBuildInputs = [
40 appdirs
41 build
42 magicgui
43 pydantic
44 pytomlpp
45 pyyaml
46 rich
47 typer
48 ];
49
50 pythonImportsCheck = [
51 "npe2"
52 ];
53
54 passthru.tests = { inherit napari; };
55
56 meta = with lib; {
57 description = "Plugin system for napari (the image visualizer)";
58 homepage = "https://github.com/napari/npe2";
59 license = licenses.bsd3;
60 maintainers = with maintainers; [ SomeoneSerge ];
61 };
62}