From 484463f024cbeabfb2d09444dc70e735abd63cfc Mon Sep 17 00:00:00 2001 From: NovaViper Date: Sun, 14 Jun 2026 16:13:45 -0500 Subject: [PATCH] plasma-panel-colorizer: fix presets not being listed The script for listing presets didn't have execute permissions. This commit adds executable permission for the script Co-authored-by: Heitor Augusto --- .../pl/plasma-panel-colorizer/package.nix | 25 +++++++++++++++++++ .../use-dbus-service-directly.patch | 11 ++++++++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/by-name/pl/plasma-panel-colorizer/use-dbus-service-directly.patch diff --git a/pkgs/by-name/pl/plasma-panel-colorizer/package.nix b/pkgs/by-name/pl/plasma-panel-colorizer/package.nix index 3a0bd7a4aba8..58cb8904f6f4 100644 --- a/pkgs/by-name/pl/plasma-panel-colorizer/package.nix +++ b/pkgs/by-name/pl/plasma-panel-colorizer/package.nix @@ -5,7 +5,16 @@ cmake, kdePackages, nix-update-script, + makeWrapper, + python3, + glib, }: +let + pythonEnv = python3.withPackages (p: [ + p.dbus-python + p.pygobject3 + ]); +in stdenv.mkDerivation (finalAttrs: { pname = "plasma-panel-colorizer"; @@ -21,6 +30,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake kdePackages.extra-cmake-modules + makeWrapper ]; buildInputs = [ @@ -39,12 +49,27 @@ stdenv.mkDerivation (finalAttrs: { passthru.updateScript = nix-update-script { }; + patches = [ ./use-dbus-service-directly.patch ]; + + postPatch = '' + substituteInPlace package/contents/ui/tools/service.py \ + --replace-fail '#!/usr/bin/env python' '#!${lib.getExe pythonEnv}' + ''; + + postInstall = '' + chmod 755 $out/share/plasma/plasmoids/luisbocanegra.panel.colorizer/contents/ui/tools/{list_presets.sh,service.py} + + wrapProgram $out/share/plasma/plasmoids/luisbocanegra.panel.colorizer/contents/ui/tools/service.py \ + --prefix GI_TYPELIB_PATH : "${glib.out}/lib/girepository-1.0" + ''; + meta = { description = "Fully-featured widget to bring Latte-Dock and WM status bar customization features to the default KDE Plasma panel"; homepage = "https://github.com/luisbocanegra/plasma-panel-colorizer"; changelog = "https://github.com/luisbocanegra/plasma-panel-colorizer/blob/main/CHANGELOG.md"; license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ HeitorAugustoLN ]; + sourceProvenance = [ lib.sourceTypes.fromSource ]; inherit (kdePackages.kwindowsystem.meta) platforms; }; }) diff --git a/pkgs/by-name/pl/plasma-panel-colorizer/use-dbus-service-directly.patch b/pkgs/by-name/pl/plasma-panel-colorizer/use-dbus-service-directly.patch new file mode 100644 index 000000000000..c52b96cfbcaf --- /dev/null +++ b/pkgs/by-name/pl/plasma-panel-colorizer/use-dbus-service-directly.patch @@ -0,0 +1,11 @@ +--- a/package/contents/ui/DBusServiceModel.qml ++++ b/package/contents/ui/DBusServiceModel.qml +@@ -8,7 +8,7 @@ Item { + property string toolsDir: Qt.resolvedUrl("./tools").toString().substring(7) + "/" + property string serviceUtil: toolsDir + "service.py" + property string pythonExecutable: plasmoid.configuration.pythonExecutable +- property string serviceCmd: pythonExecutable + " '" + serviceUtil + "' " + Plasmoid.containment.id + " " + Plasmoid.id ++ property string serviceCmd: serviceUtil + " " + Plasmoid.containment.id + " " + Plasmoid.id + readonly property string service: Plasmoid.metaData.pluginId + ".c" + Plasmoid.containment.id + ".w" + Plasmoid.id + readonly property string path: "/preset" +