1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, setuptools-scm
5, pytestCheckHook
6, pytest-mypy-plugins
7, typing-extensions
8, qtpy
9, pyside2
10, psygnal
11, docstring-parser
12, napari # a reverse-dependency, for tests
13}: buildPythonPackage rec {
14 pname = "magicgui";
15 version = "0.5.1";
16
17 format = "pyproject";
18
19 src = fetchFromGitHub {
20 owner = "napari";
21 repo = "magicgui";
22 rev = "refs/tags/v${version}";
23 sha256 = "sha256-fVfBQaaT8/lUGqZRXjOPgvkC01Izb8Sxqn7RCqnW9bo=";
24 };
25
26 SETUPTOOLS_SCM_PRETEND_VERSION = version;
27
28 nativeBuildInputs = [ setuptools-scm ];
29 propagatedBuildInputs = [ typing-extensions qtpy pyside2 psygnal docstring-parser ];
30 checkInputs = [ pytestCheckHook pytest-mypy-plugins ];
31
32 doCheck = false; # Reports "Fatal Python error"
33
34 passthru.tests = { inherit napari; };
35
36 meta = with lib; {
37 description = "Build GUIs from python functions, using magic. (napari/magicgui)";
38 homepage = "https://github.com/napari/magicgui";
39 license = licenses.mit;
40 maintainers = with maintainers; [ SomeoneSerge ];
41 };
42}