nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, appdirs
5, pyyaml
6, pytomlpp
7, pydantic
8, magicgui
9, typer
10, setuptools-scm
11, napari # reverse dependency, for tests
12}:
13
14let
15 pname = "napari-npe2";
16 version = "0.3.0";
17in
18buildPythonPackage {
19 inherit pname version;
20
21 format = "pyproject";
22
23 src = fetchFromGitHub {
24 owner = "napari";
25 repo = "npe2";
26 rev = "v${version}";
27 hash = "sha256-IyDUeztWQ8JWXDo//76iHzAlWWaZP6/0lwCh0eZAZsM=";
28 };
29
30 SETUPTOOLS_SCM_PRETEND_VERSION = version;
31
32 nativeBuildInputs = [
33 # npe2 *can* build without it,
34 # but then setuptools refuses to acknowledge it when building napari
35 setuptools-scm
36 ];
37 propagatedBuildInputs = [
38 appdirs
39 pyyaml
40 pytomlpp
41 pydantic
42 magicgui
43 typer
44 ];
45
46 passthru.tests = { inherit napari; };
47
48 meta = with lib; {
49 description = "Yet another plugin system for napari (the image visualizer)";
50 homepage = "https://github.com/napari/npe2";
51 license = licenses.bsd3;
52 maintainers = with maintainers; [ SomeoneSerge ];
53 };
54}