I am trying to package a python application that uses pyqt5. The application works perfectly, however the dark theme is not applied.
{ lib, pkgs, qt5 }:
let
drvname = "test";
python = pkgs.python310;
pythonRunPackages = with python.pkgs;[
pyqtgraph
pyqt5
tkinter
click
]
pythonDevPackages = pythonRunPackages ++ [];
venv = python.withPackages (ps: pythonDevPackages);
package = python.pkgs.buildPythonApplication {
pname = "${drvname}";
format = "pyproject";
version = "latest";
propagatedBuildInputs = pythonRunPackages ++ (with python.pkgs; [ setuptools ]);
src = ./.;
doCheck = true;
checkPhase = "pytest";
};
apps = python.withPackages (ps: with ps; [ package ]);
in
{
inherit apps venv;
shell = pkgs.mkShell {
buildInputs = [ pkgs.qtcreator apps ] ++ pythonDevPackages;
shellHook = ''
export PYTHONPATH="$(pwd)/code:$PYTHONPATH"
'';
};
}
I get the following warnings:
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
/nix/store/amlvanjz1nvf4y0cl7df6g2akf2kdfy2-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so: undefined symbol: g_assertion_message_cmpint
Failed to load module: /nix/store/amlvanjz1nvf4y0cl7df6g2akf2kdfy2-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so
/nix/store/1nyg1fvhpz8bx3vn3r9f18zhra2rpbx9-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38’ not found (required by /nix/store/4dj2b4jp43l0bkqspxqwkbcg7plac293-gvfs-1.52.2/lib/gio/modules/libgvfsdbus.so)
Failed to load module: /nix/store/4dj2b4jp43l0bkqspxqwkbcg7plac293-gvfs-1.52.2/lib/gio/modules/libgvfsdbus.so
QApplication: invalid style override ‘Pop-dark’ passed, ignoring it.
Available styles: Windows, Fusion
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlagsQSurfaceFormat::FormatOption(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
I tried all wrapQtAppsHook
examples I could find in the manual and in other nixpkgs, however could not get rid of the warning.
Any ideas?