depot/third_party/nixpkgs/pkgs/development/python-modules/pythonqwt/default.nix

61 lines
1.2 KiB
Nix
Raw Normal View History

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
numpy,
qtpy,
# tests
pyqt6,
qt6,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pythonqwt";
version = "0.12.7";
pyproject = true;
src = fetchFromGitHub {
owner = "PlotPyStack";
repo = "PythonQwt";
rev = "refs/tags/v${version}";
hash = "sha256-Am7XYumq9PAOmT2ZTC+AAE4VM6/yNF11WLXoTFSbDh4=";
};
build-system = [
setuptools
];
dependencies = [
qtpy
numpy
];
nativeCheckInputs = [
pytestCheckHook
# Not propagating this, to allow one to choose to either choose a pyqt /
# pyside implementation
pyqt6
];
preCheck = ''
export QT_PLUGIN_PATH="${lib.getBin qt6.qtbase}/${qt6.qtbase.qtPluginPrefix}"
export QT_QPA_PLATFORM=offscreen
'';
pythonImportsCheck = [ "qwt" ];
meta = {
description = "Qt plotting widgets for Python (pure Python reimplementation of Qwt C++ library)";
homepage = "https://github.com/PlotPyStack/PythonQwt";
changelog = "https://github.com/PlotPyStack/PythonQwt/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.lgpl21Only;
maintainers = with lib.maintainers; [ doronbehar ];
};
}