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