1{
2 lib,
3 gitUpdater,
4 stdenv,
5 buildPythonPackage,
6 setuptools,
7 fetchFromGitHub,
8 pyqt5,
9 pyqtwebengine,
10 matplotlib,
11 orange-canvas-core,
12 pyqtgraph,
13 typing-extensions,
14 qt5,
15 pytestCheckHook,
16 pytest-qt,
17 appnope,
18}:
19
20buildPythonPackage rec {
21 pname = "orange-widget-base";
22 version = "4.25.1";
23 pyproject = true;
24
25 src = fetchFromGitHub {
26 owner = "biolab";
27 repo = "orange-widget-base";
28 tag = version;
29 hash = "sha256-ENP3Xyubsx7Q2w4cTQCsZuvC0cbm3KwaoDGbF0fk3dg=";
30 };
31
32 build-system = [ setuptools ];
33
34 dependencies = [
35 matplotlib
36 orange-canvas-core
37 pyqt5
38 pyqtgraph
39 pyqtwebengine
40 typing-extensions
41 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ appnope ];
42
43 pythonImportsCheck = [ "orangewidget" ];
44
45 preCheck = ''
46 export HOME=$(mktemp -d)
47 export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
48 export QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins";
49 export QT_QPA_PLATFORM=offscreen
50 '';
51
52 nativeCheckInputs = [
53 pytest-qt
54 pytestCheckHook
55 ];
56
57 disabledTestPaths = [
58 "orangewidget/report/tests/test_report.py"
59 "orangewidget/tests/test_widget.py"
60 ];
61
62 passthru.updateScript = gitUpdater { };
63
64 meta = {
65 description = "Implementation of the base OWBaseWidget class and utilities for use in Orange Canvas workflows";
66 homepage = "https://github.com/biolab/orange-widget-base";
67 license = [ lib.licenses.gpl3Plus ];
68 maintainers = [ lib.maintainers.lucasew ];
69 };
70}