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