diff --git a/pkgs/development/python-modules/orange-widget-base/default.nix b/pkgs/development/python-modules/orange-widget-base/default.nix new file mode 100644 index 000000000000..ee556ab39f77 --- /dev/null +++ b/pkgs/development/python-modules/orange-widget-base/default.nix @@ -0,0 +1,62 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pyqt5 +, pyqtwebengine +, matplotlib +, orange-canvas-core +, pyqtgraph +, typing-extensions +, qt5 +, pytestCheckHook +, pytest-qt +, appnope +}: + +buildPythonPackage rec { + pname = "orange-widget-base"; + version = "4.21.0"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-43JeEdgEb6WS7PySW1x08fn02yl9Q/HwwKo6ojaqiH0="; + }; + + propagatedBuildInputs = [ + matplotlib + orange-canvas-core + pyqt5 + pyqtgraph + pyqtwebengine + typing-extensions + ] ++ lib.optionals stdenv.isDarwin [ + appnope + ]; + + pythonImportsCheck = [ "orangewidget" ]; + + preCheck = '' + export HOME=$(mktemp -d) + export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}" + export QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins"; + export QT_QPA_PLATFORM=offscreen + ''; + + nativeCheckInputs = [ + pytest-qt + pytestCheckHook + ]; + + disabledTestPaths = [ + "orangewidget/report/tests/test_report.py" + "orangewidget/tests/test_widget.py" + ]; + + meta = { + description = "Implementation of the base OWBaseWidget class and utilities for use in Orange Canvas workflows"; + homepage = "https://github.com/biolab/orange-widget-base"; + license = [ lib.licenses.gpl3Plus ]; + maintainers = [ lib.maintainers.lucasew ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d1c44492d959..3421fcae2d8e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7582,6 +7582,8 @@ self: super: with self; { orange-canvas-core = callPackage ../development/python-modules/orange-canvas-core { }; + orange-widget-base = callPackage ../development/python-modules/orange-widget-base { }; + orderedmultidict = callPackage ../development/python-modules/orderedmultidict { }; ordered-set = callPackage ../development/python-modules/ordered-set { };