python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / pyqtdarktheme / default.nix
blob2d4841227071937d8a42c7a71f196d6823a00b04
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
7   darkdetect,
8   poetry-core,
10   pyqt5,
11   pytest-mock,
12   pytest-qt,
13   pytestCheckHook,
14   qt5,
17 buildPythonPackage rec {
18   pname = "pyqtdarktheme";
19   version = "2.1.0";
20   pyproject = true;
22   disabled = pythonOlder "3.7";
24   src = fetchFromGitHub {
25     owner = "5yutan5";
26     repo = "PyQtDarkTheme";
27     rev = "v${version}";
28     hash = "sha256-jK+wnIyPE8Bav0pzbvVisYYCzdRshYw1S2t0H3Pro5M=";
29   };
31   patches = [ ./add-missing-argument-to-the-proxy-style-initializer.patch ];
33   nativeBuildInputs = [ poetry-core ];
35   propagatedBuildInputs = [ darkdetect ];
37   nativeCheckInputs = [
38     pyqt5
39     pytest-mock
40     pytest-qt
41     pytestCheckHook
42   ];
44   pythonImportsCheck = [ "qdarktheme" ];
46   prePatch = ''
47     sed -i 's#darkdetect = ".*"#darkdetect = "*"#' pyproject.toml
48   '';
50   preCheck = ''
51     export HOME=$(mktemp -d)
52     export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
53     export QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins";
54     export QT_QPA_PLATFORM=offscreen
55   '';
57   meta = with lib; {
58     description = "Flat dark theme for PySide and PyQt";
59     homepage = "https://pyqtdarktheme.readthedocs.io/en/stable";
60     license = licenses.mit;
61     maintainers = with maintainers; [ paveloom ];
62   };