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