onedrivegui: add qt wrapping (#364207)

This commit is contained in:
Aleksana
2024-12-12 17:52:29 +08:00
committed by GitHub
+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") ])