1{
2 lib,
3 buildPythonPackage,
4 docstring-parser,
5 fetchFromGitHub,
6 hatch-vcs,
7 hatchling,
8 napari, # a reverse-dependency, for tests
9 psygnal,
10 pyside2,
11 pytestCheckHook,
12 pythonOlder,
13 superqt,
14 typing-extensions,
15}:
16
17buildPythonPackage rec {
18 pname = "magicgui";
19 version = "0.10.1";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "pyapp-kit";
26 repo = "magicgui";
27 tag = "v${version}";
28 hash = "sha256-jpM5OpQ10cF+HBhAI9cI/gXdHMzYsgY9vtpfNq+5fIw=";
29 };
30
31 build-system = [
32 hatch-vcs
33 hatchling
34 ];
35
36 dependencies = [
37 typing-extensions
38 superqt
39 pyside2
40 psygnal
41 docstring-parser
42 ];
43
44 nativeCheckInputs = [ pytestCheckHook ];
45
46 doCheck = false; # Reports "Fatal Python error"
47
48 passthru.tests = {
49 inherit napari;
50 };
51
52 meta = with lib; {
53 description = "Build GUIs from python functions, using magic. (napari/magicgui)";
54 homepage = "https://github.com/pyapp-kit/magicgui";
55 changelog = "https://github.com/pyapp-kit/magicgui/blob/${src.tag}/CHANGELOG.md";
56 license = licenses.mit;
57 maintainers = with maintainers; [ SomeoneSerge ];
58 };
59}