blob: 92b2b61b5083299ae72759954d784e78991e0214 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
darkdetect,
poetry-core,
pyqt5,
pytest-mock,
pytest-qt,
pytestCheckHook,
qt5,
}:
buildPythonPackage rec {
pname = "pyqtdarktheme";
version = "2.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "5yutan5";
repo = "PyQtDarkTheme";
rev = "v${version}";
hash = "sha256-jK+wnIyPE8Bav0pzbvVisYYCzdRshYw1S2t0H3Pro5M=";
};
patches = [ ./add-missing-argument-to-the-proxy-style-initializer.patch ];
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [ darkdetect ];
nativeCheckInputs = [
pyqt5
pytest-mock
pytest-qt
pytestCheckHook
];
pythonImportsCheck = [ "qdarktheme" ];
prePatch = ''
sed -i 's#darkdetect = ".*"#darkdetect = "*"#' pyproject.toml
'';
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
'';
meta = {
description = "Flat dark theme for PySide and PyQt";
homepage = "https://pyqtdarktheme.readthedocs.io/en/stable";
license = lib.licenses.mit;
maintainers = [ ];
};
}
|