onedrivegui: add qt wrapping

Otherwise it won't launch at all on systems that don't have QT_* related
environment variables set.
This commit is contained in:
Doron Behar
2024-12-11 14:08:00 +02:00
parent 7c314adf55
commit 0cf255fc82
+9
View File
@@ -1,6 +1,7 @@
{
lib,
python3Packages,
qt6,
fetchFromGitHub,
writeText,
copyDesktopItems,
@@ -37,9 +38,15 @@ python3Packages.buildPythonApplication rec {
nativeBuildInputs = [
copyDesktopItems
qt6.wrapQtAppsHook
makeWrapper
];
buildInputs = [
qt6.qtbase
qt6.qtwayland
];
propagatedBuildInputs = with python3Packages; [
pyside6
requests
@@ -47,6 +54,7 @@ python3Packages.buildPythonApplication rec {
# wrap manually to avoid having a bash script in $out/bin with a .py extension
dontWrapPythonPrograms = true;
dontWrapQtApps = true;
doCheck = false; # No tests defined
pythonImportsCheck = [ "OneDriveGUI" ];
@@ -79,6 +87,7 @@ python3Packages.buildPythonApplication rec {
rm -r $out/bin/*
makeWrapper ${python3Packages.python.interpreter} $out/bin/onedrivegui \
''${qtWrapperArgs[@]} \
--prefix PATH : ${lib.makeBinPath [ onedrive ]} \
--prefix PYTHONPATH : ${
python3Packages.makePythonPath (propagatedBuildInputs ++ [ (placeholder "out") ])