2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-07-21 07:28:18 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, scipy
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
2020-11-24 20:58:05 +00:00
|
|
|
, pyqt5
|
2021-07-21 07:28:18 +00:00
|
|
|
, pyopengl
|
|
|
|
, qt5
|
|
|
|
, python
|
|
|
|
, pytestCheckHook
|
|
|
|
, freefont_ttf
|
|
|
|
, makeFontsConf
|
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
let
|
|
|
|
fontsConf = makeFontsConf {
|
|
|
|
fontDirectories = [ freefont_ttf ];
|
|
|
|
};
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyqtgraph";
|
2021-07-21 07:28:18 +00:00
|
|
|
version = "0.12.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyqtgraph";
|
|
|
|
repo = "pyqtgraph";
|
|
|
|
rev = "pyqtgraph-${version}";
|
|
|
|
sha256 = "093kkxwj75nb508vz7px4x7lxrwpaff10pl15m4h74hjwyvbsg3d";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
# TODO: remove when updating to 0.12.3
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/pyqtgraph/pyqtgraph/commit/2de5cd78da92b48e48255be2f41ae332cf8bb675.patch";
|
|
|
|
sha256 = "1hy86psqyl6ipvbg23zvackkd6f7ajs6qll0mbs0x2zmrj92hk00";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
pyqt5
|
|
|
|
scipy
|
|
|
|
pyopengl
|
|
|
|
];
|
2020-11-24 20:58:05 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
preCheck = ''
|
|
|
|
export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
|
|
|
|
export QT_QPA_PLATFORM=offscreen
|
|
|
|
export DYLD_FRAMEWORK_PATH=/System/Library/Frameworks
|
|
|
|
export FONTCONFIG_FILE=${fontsConf}
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
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";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ koral ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|