2022-01-03 16:56:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, setuptools-scm
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-mypy-plugins
|
|
|
|
, typing-extensions
|
|
|
|
, qtpy
|
|
|
|
, pyside2
|
|
|
|
, psygnal
|
|
|
|
, docstring-parser
|
2022-04-15 01:41:22 +00:00
|
|
|
, napari # a reverse-dependency, for tests
|
2022-01-03 16:56:52 +00:00
|
|
|
}: buildPythonPackage rec {
|
|
|
|
pname = "magicgui";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.5.1";
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "napari";
|
|
|
|
repo = "magicgui";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-fVfBQaaT8/lUGqZRXjOPgvkC01Izb8Sxqn7RCqnW9bo=";
|
2022-01-03 16:56:52 +00:00
|
|
|
};
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
|
|
|
propagatedBuildInputs = [ typing-extensions qtpy pyside2 psygnal docstring-parser ];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook pytest-mypy-plugins ];
|
2022-04-15 01:41:22 +00:00
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
doCheck = false; # Reports "Fatal Python error"
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
passthru.tests = { inherit napari; };
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Build GUIs from python functions, using magic. (napari/magicgui)";
|
|
|
|
homepage = "https://github.com/napari/magicgui";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ SomeoneSerge ];
|
|
|
|
};
|
|
|
|
}
|