2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
scipy,
|
|
|
|
numpy,
|
2024-07-01 15:47:52 +00:00
|
|
|
pyqt6,
|
2024-06-05 15:53:02 +00:00
|
|
|
pyopengl,
|
2024-07-01 15:47:52 +00:00
|
|
|
qt6,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
freefont_ttf,
|
|
|
|
makeFontsConf,
|
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
let
|
2024-06-05 15:53:02 +00:00
|
|
|
fontsConf = makeFontsConf { fontDirectories = [ freefont_ttf ]; };
|
2021-07-21 07:28:18 +00:00
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyqtgraph";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.13.7";
|
2023-11-16 04:20:00 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyqtgraph";
|
|
|
|
repo = "pyqtgraph";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/pyqtgraph-${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-MUwg1v6oH2TGmJ14Hp9i6KYierJbzPggK59QaHSXHVA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2021-07-21 07:28:18 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
pyopengl
|
|
|
|
];
|
2024-07-01 15:47:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
# Not propagating it so that every consumer of this package will be able to
|
|
|
|
# use any of the upstream supported Qt Library, See:
|
|
|
|
# https://pyqtgraph.readthedocs.io/en/pyqtgraph-0.13.7/getting_started/how_to_use.html#pyqt-and-pyside
|
|
|
|
pyqt6
|
|
|
|
];
|
2020-11-24 20:58:05 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
preCheck = ''
|
2024-07-01 15:47:52 +00:00
|
|
|
export QT_PLUGIN_PATH="${lib.getBin qt6.qtbase}/${qt6.qtbase.qtPluginPrefix}"
|
2021-07-21 07:28:18 +00:00
|
|
|
export QT_QPA_PLATFORM=offscreen
|
|
|
|
export DYLD_FRAMEWORK_PATH=/System/Library/Frameworks
|
|
|
|
export FONTCONFIG_FILE=${fontsConf}
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# we only want to run unittests
|
|
|
|
"tests"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
lib.optionals (!stdenv.hostPlatform.isx86) [
|
|
|
|
# small precision-related differences on other architectures,
|
|
|
|
# upstream doesn't consider it serious.
|
|
|
|
# https://github.com/pyqtgraph/pyqtgraph/issues/2110
|
|
|
|
"test_PolyLineROI"
|
|
|
|
]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
|
2024-06-05 15:53:02 +00:00
|
|
|
# https://github.com/pyqtgraph/pyqtgraph/issues/2645
|
|
|
|
"test_rescaleData"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Scientific Graphics and GUI Library for Python";
|
2021-08-05 21:33:18 +00:00
|
|
|
homepage = "https://www.pyqtgraph.org/";
|
2020-11-24 20:58:05 +00:00
|
|
|
changelog = "https://github.com/pyqtgraph/pyqtgraph/blob/master/CHANGELOG";
|
2024-07-01 15:47:52 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
maintainers = with lib.maintainers; [ koral doronbehar ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|