Update patch

+27 -32
+20 -25
pkgs/kde/third-party/wallpaper-engine-plugin/default.nix
··· 17 }: 18 mkKdeDerivation { 19 pname = "wallpaper-engine-kde-plugin"; 20 - version = "0.5.5-unstable-2024-06-16"; 21 22 src = fetchFromGitHub { 23 owner = "catsout"; 24 repo = "wallpaper-engine-kde-plugin"; 25 - rev = "1e604105c586c7938c5b2c19e3dc8677b2eb4bb4"; 26 - hash = "sha256-bKGQxyS8gUi+37lODLVHphMoQwLKZt/hpSjR5MN+5GA="; 27 fetchSubmodules = true; 28 }; 29 30 - patches = [ ./nix-plugin.patch ]; 31 32 extraNativeBuildInputs = [ 33 kpackage ··· 42 ]; 43 44 extraCmakeFlags = [ 45 - "-DQML2_CMAKE_PATH=${ 46 - lib.makeSearchPath "lib/qt-6/qml" [ 47 - qtmultimedia 48 - qtwebchannel 49 - qtwebengine 50 - qtwebsockets 51 - ] 52 - }" 53 - "-DQt6_DIR=${qtbase}/lib/cmake/Qt6" 54 - "-DUSE_PLASMAPKG=ON" 55 ]; 56 57 - postInstall = 58 - let 59 - py3-ws = python3.withPackages (ps: with ps; [ websockets ]); 60 - in 61 - '' 62 - cd ../plugin 63 - PATH=${py3-ws}/bin:$PATH patchShebangs --build ./contents/pyext.py 64 - substituteInPlace ./contents/ui/Pyext.qml --replace-fail NIX_STORE_PACKAGE_PATH ${placeholder "out"} 65 - kpackagetool6 -i ./ -p $out/share/plasma/wallpapers/ 66 - ''; 67 68 meta = with lib; { 69 description = "KDE wallpaper plugin integrating Wallpaper Engine"; 70 homepage = "https://github.com/catsout/wallpaper-engine-kde-plugin"; 71 license = licenses.gpl2Only; 72 - maintainers = with maintainers; [ macronova ]; 73 }; 74 }
··· 17 }: 18 mkKdeDerivation { 19 pname = "wallpaper-engine-kde-plugin"; 20 + version = "0.5.5-unstable-2024-11-03"; 21 22 src = fetchFromGitHub { 23 owner = "catsout"; 24 repo = "wallpaper-engine-kde-plugin"; 25 + rev = "ed58dd8b920dbb2bf0859ab64e0b5939b8a32a0e"; 26 + hash = "sha256-ICQLtw+qaOMf0lkqKegp+Dkl7eUgPqKDn8Fj5Osb7eA="; 27 fetchSubmodules = true; 28 }; 29 30 + patches = [./nix-plugin.patch]; 31 32 extraNativeBuildInputs = [ 33 kpackage ··· 42 ]; 43 44 extraCmakeFlags = [ 45 + (lib.cmakeFeature "QML_LIB" (lib.makeSearchPathOutput "out" "lib/qt-6/qml" [ 46 + qtmultimedia 47 + qtwebchannel 48 + qtwebengine 49 + qtwebsockets 50 + ])) 51 + (lib.cmakeFeature "Qt6_DIR" "${qtbase}/lib/cmake/Qt6") 52 ]; 53 54 + postInstall = let 55 + py3-ws = python3.withPackages (ps: with ps; [websockets]); 56 + in '' 57 + cd $out/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde 58 + chmod +x ./contents/pyext.py 59 + PATH=${py3-ws}/bin:$PATH patchShebangs --build ./contents/pyext.py 60 + substituteInPlace ./contents/ui/Pyext.qml --replace-fail NIX_STORE_PACKAGE_PATH ${placeholder "out"} 61 + ''; 62 63 meta = with lib; { 64 description = "KDE wallpaper plugin integrating Wallpaper Engine"; 65 homepage = "https://github.com/catsout/wallpaper-engine-kde-plugin"; 66 license = licenses.gpl2Only; 67 + maintainers = with maintainers; [macronova]; 68 }; 69 }
+7 -7
pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch
··· 1 diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index e1298ba..1c9ddec 100644 3 --- a/CMakeLists.txt 4 +++ b/CMakeLists.txt 5 @@ -9,6 +9,7 @@ set(KF_MIN_VERSION "5.68.0") 6 project("WallpaperEngineKde") 7 8 9 - +add_definitions(-DQML2_CMAKE_PATH="${QML2_CMAKE_PATH}") 10 set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true) 11 set(CMAKE_POSITION_INDEPENDENT_CODE ON) 12 if(NOT OpenGL_GL_PREFERENCE) ··· 14 old mode 100644 15 new mode 100755 16 diff --git a/plugin/contents/ui/Pyext.qml b/plugin/contents/ui/Pyext.qml 17 - index 1a48f5e..8a9c9c9 100644 18 --- a/plugin/contents/ui/Pyext.qml 19 +++ b/plugin/contents/ui/Pyext.qml 20 @@ -15,7 +15,8 @@ Item { ··· 22 "[ -f \"$HOME/.local/share/$EXT\" ] && WKD=\"$HOME/.local/share/$EXT\"", 23 "[ -f \"$XDG_DATA_HOME/$EXT\" ] && WKD=\"$XDG_DATA_HOME/$EXT\"", 24 - `exec python3 "$WKD" "${ws_server.url}"` 25 - + "[ -f \"NIX_STORE_PACKAGE_PATH/share/$EXT\" ] && WKD=\"NIX_STORE_PACKAGE_PATH/share/$EXT\"", 26 + `"$WKD" "${ws_server.url}"` 27 ].join("\n"); 28 return sh; 29 } 30 diff --git a/src/plugin.cpp b/src/plugin.cpp 31 - index 5e8a7e2..1709a27 100644 32 --- a/src/plugin.cpp 33 +++ b/src/plugin.cpp 34 - @@ -13,6 +13,18 @@ class Port : public QQmlExtensionPlugin { 35 Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) 36 37 public: ··· 39 + if (strcmp(uri, "com.github.catsout.wallpaperEngineKde") != 0) return; 40 + if (!engine) return; 41 + 42 - + QString pathList = QML2_CMAKE_PATH; 43 + QStringList paths = pathList.split(':', Qt::SkipEmptyParts); 44 + for (const QString &path : paths) { 45 + engine->addImportPath(path);
··· 1 diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index e1298ba..1af7d0a 100644 3 --- a/CMakeLists.txt 4 +++ b/CMakeLists.txt 5 @@ -9,6 +9,7 @@ set(KF_MIN_VERSION "5.68.0") 6 project("WallpaperEngineKde") 7 8 9 + +add_definitions(-DQML_LIB="${QML_LIB}") 10 set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true) 11 set(CMAKE_POSITION_INDEPENDENT_CODE ON) 12 if(NOT OpenGL_GL_PREFERENCE) ··· 14 old mode 100644 15 new mode 100755 16 diff --git a/plugin/contents/ui/Pyext.qml b/plugin/contents/ui/Pyext.qml 17 + index 1a48f5e..7db2480 100644 18 --- a/plugin/contents/ui/Pyext.qml 19 +++ b/plugin/contents/ui/Pyext.qml 20 @@ -15,7 +15,8 @@ Item { ··· 22 "[ -f \"$HOME/.local/share/$EXT\" ] && WKD=\"$HOME/.local/share/$EXT\"", 23 "[ -f \"$XDG_DATA_HOME/$EXT\" ] && WKD=\"$XDG_DATA_HOME/$EXT\"", 24 - `exec python3 "$WKD" "${ws_server.url}"` 25 + + "[ -f \"NIX_STORE_PACKAGE_PATH/share/$EXT\" ] && WKD=\"NIX_STORE_PACKAGE_PATH/share/$EXT\"", 26 + `"$WKD" "${ws_server.url}"` 27 ].join("\n"); 28 return sh; 29 } 30 diff --git a/src/plugin.cpp b/src/plugin.cpp 31 + index 4bc817e..a98cb4a 100644 32 --- a/src/plugin.cpp 33 +++ b/src/plugin.cpp 34 + @@ -14,6 +14,18 @@ class Port : public QQmlExtensionPlugin { 35 Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) 36 37 public: ··· 39 + if (strcmp(uri, "com.github.catsout.wallpaperEngineKde") != 0) return; 40 + if (!engine) return; 41 + 42 + + QString pathList = QML_LIB; 43 + QStringList paths = pathList.split(':', Qt::SkipEmptyParts); 44 + for (const QString &path : paths) { 45 + engine->addImportPath(path);