about summary refs log tree commit diff
path: root/pkgs/development/python-modules/napari-npe2/default.nix
blob: 1affda693c99ad7e6f384c393ac65d92c6e37173 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
  lib,
  appdirs,
  build,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  hatch-vcs,
  magicgui,
  napari, # reverse dependency, for tests
  pydantic,
  pythonOlder,
  pytomlpp,
  pyyaml,
  rich,
  typer,
  tomli-w,
}:

buildPythonPackage rec {
  pname = "napari-npe2";
  version = "0.7.2-unstable-2023-10-20";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "napari";
    repo = "npe2";
    rev = "9d29e4d6dbbec75c2d36273647efd9ddfb59ded0";
    hash = "sha256-JLu/5pXijPdpKY2z2rREtSKPiP33Yy4viegbxUiQg7Y=";
  };

  # fix this in the next release
  env.SETUPTOOLS_SCM_PRETEND_VERSION = "0.7.2";

  nativeBuildInputs = [
    hatchling
    hatch-vcs
  ];

  propagatedBuildInputs = [
    appdirs
    build
    magicgui
    pydantic
    pytomlpp
    pyyaml
    rich
    typer
    tomli-w
  ];

  pythonImportsCheck = [ "npe2" ];

  passthru.tests = {
    inherit napari;
  };

  meta = with lib; {
    description = "Plugin system for napari (the image visualizer)";
    mainProgram = "npe2";
    homepage = "https://github.com/napari/npe2";
    license = licenses.bsd3;
    maintainers = with maintainers; [ SomeoneSerge ];
  };
}