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