From e37b7ce7d6208a75960372b7161f1ebf16b2a7e4 Mon Sep 17 00:00:00 2001 From: macronova Date: Thu, 15 Aug 2024 17:05:10 -0700 Subject: [PATCH 1/9] kdePackages.wallpaper-engine-plugin: init at latest (1e60410) qt6 branch Update maintainer --- maintainers/maintainer-list.nix | 9 +++ pkgs/kde/default.nix | 1 + .../wallpaper-engine-plugin/default.nix | 61 +++++++++++++++++++ .../wallpaper-engine-plugin/nix-plugin.patch | 17 ++++++ 4 files changed, 88 insertions(+) create mode 100644 pkgs/kde/third-party/wallpaper-engine-plugin/default.nix create mode 100644 pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a02b6f0be78f..0b9854a306aa 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -12292,6 +12292,15 @@ githubId = 401263; keys = [ { fingerprint = "1147 43F1 E707 6F3E 6F4B 2C96 B9A8 B592 F126 F8E8"; } ]; }; + macronova = { + name = "Sicheng Pan"; + email = "trivial@invariantspace.com"; + matrix = "@macronova:invariantspace.com"; + github = "Sicheng-Pan"; + githubId = 60079945; + keys = [ { fingerprint = "49D3 FFDA 4D30 DDEE 68EF AE84 EBC4 A200 6737 3921"; } ]; + }; + mac-chaffee = { name = "Mac Chaffee"; github = "mac-chaffee"; diff --git a/pkgs/kde/default.nix b/pkgs/kde/default.nix index 6f80e4eaadb4..e2fd6c7e1dac 100644 --- a/pkgs/kde/default.nix +++ b/pkgs/kde/default.nix @@ -78,6 +78,7 @@ phonon-vlc = self.callPackage ./misc/phonon-vlc {}; polkit-qt-1 = self.callPackage ./misc/polkit-qt-1 {}; pulseaudio-qt = self.callPackage ./misc/pulseaudio-qt {}; + wallpaper-engine-plugin = self.callPackage ./third-party/wallpaper-engine-plugin {}; } ); in diff --git a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix new file mode 100644 index 000000000000..210b93f87464 --- /dev/null +++ b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix @@ -0,0 +1,61 @@ +{ + extra-cmake-modules, + fetchFromGitHub, + full, + kpackage, + libplasma, + lib, + lz4, + mkKdeDerivation, + mpv, + pkg-config, + python3, +}: +mkKdeDerivation { + pname = "wallpaper-engine-kde-plugin"; + version = "qt6"; + + src = fetchFromGitHub { + owner = "catsout"; + repo = "wallpaper-engine-kde-plugin"; + rev = "1e604105c586c7938c5b2c19e3dc8677b2eb4bb4"; + hash = "sha256-bKGQxyS8gUi+37lODLVHphMoQwLKZt/hpSjR5MN+5GA="; + fetchSubmodules = true; + }; + + patches = [./nix-plugin.patch]; + + extraBuildInputs = [ + extra-cmake-modules + full + libplasma + lz4 + mpv + ]; + + extraCmakeFlags = ["-DUSE_PLASMAPKG=ON"]; + + extraNativeBuildInputs = [ + kpackage + pkg-config + ]; + + postInstall = let + py3-ws = python3.withPackages (ps: + with ps; [ + websockets + ]); + in '' + cd ../plugin + PATH=${py3-ws}/bin:$PATH patchShebangs --build ./contents/pyext.py + substituteInPlace ./contents/ui/Pyext.qml --replace-fail NIX_STORE_PACKAGE_PATH ${placeholder "out"} + kpackagetool6 -i ./ -p $out/share/plasma/wallpapers/ + ''; + + meta = with lib; { + description = "A KDE wallpaper plugin integrating Wallpaper Engine"; + homepage = "https://github.com/catsout/wallpaper-engine-kde-plugin"; + license = licenses.gpl2; + maintainers = with maintainers; [ macronova ]; + }; +} diff --git a/pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch b/pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch new file mode 100644 index 000000000000..042226d6dabe --- /dev/null +++ b/pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch @@ -0,0 +1,17 @@ +diff --git a/plugin/contents/pyext.py b/plugin/contents/pyext.py +old mode 100644 +new mode 100755 +diff --git a/plugin/contents/ui/Pyext.qml b/plugin/contents/ui/Pyext.qml +index 1a48f5e..8a9c9c9 100644 +--- a/plugin/contents/ui/Pyext.qml ++++ b/plugin/contents/ui/Pyext.qml +@@ -15,7 +15,8 @@ Item { + "[ -f /usr/share/$EXT ] && WKD=/usr/share/$EXT", + "[ -f \"$HOME/.local/share/$EXT\" ] && WKD=\"$HOME/.local/share/$EXT\"", + "[ -f \"$XDG_DATA_HOME/$EXT\" ] && WKD=\"$XDG_DATA_HOME/$EXT\"", +- `exec python3 "$WKD" "${ws_server.url}"` ++ "[ -f \"NIX_STORE_PACKAGE_PATH/share/$EXT\" ] && WKD=\"NIX_STORE_PACKAGE_PATH/share/$EXT\"", ++ `"$WKD" "${ws_server.url}"` + ].join("\n"); + return sh; + } From 4af2833729816681f0e59c3503fe8cc8a6fdb9d4 Mon Sep 17 00:00:00 2001 From: macronova Date: Thu, 15 Aug 2024 18:08:45 -0700 Subject: [PATCH 2/9] Reorder maintainer and format new file --- maintainers/maintainer-list.nix | 11 ++++---- .../wallpaper-engine-plugin/default.nix | 25 +++++++++---------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 0b9854a306aa..aeced5c4e464 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -12292,6 +12292,11 @@ githubId = 401263; keys = [ { fingerprint = "1147 43F1 E707 6F3E 6F4B 2C96 B9A8 B592 F126 F8E8"; } ]; }; + mac-chaffee = { + name = "Mac Chaffee"; + github = "mac-chaffee"; + githubId = 7581860; + }; macronova = { name = "Sicheng Pan"; email = "trivial@invariantspace.com"; @@ -12300,12 +12305,6 @@ githubId = 60079945; keys = [ { fingerprint = "49D3 FFDA 4D30 DDEE 68EF AE84 EBC4 A200 6737 3921"; } ]; }; - - mac-chaffee = { - name = "Mac Chaffee"; - github = "mac-chaffee"; - githubId = 7581860; - }; madjar = { email = "georges.dubus@compiletoi.net"; github = "madjar"; diff --git a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix index 210b93f87464..8a1302a1de37 100644 --- a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix +++ b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix @@ -23,7 +23,7 @@ mkKdeDerivation { fetchSubmodules = true; }; - patches = [./nix-plugin.patch]; + patches = [ ./nix-plugin.patch ]; extraBuildInputs = [ extra-cmake-modules @@ -33,24 +33,23 @@ mkKdeDerivation { mpv ]; - extraCmakeFlags = ["-DUSE_PLASMAPKG=ON"]; + extraCmakeFlags = [ "-DUSE_PLASMAPKG=ON" ]; extraNativeBuildInputs = [ kpackage pkg-config ]; - postInstall = let - py3-ws = python3.withPackages (ps: - with ps; [ - websockets - ]); - in '' - cd ../plugin - PATH=${py3-ws}/bin:$PATH patchShebangs --build ./contents/pyext.py - substituteInPlace ./contents/ui/Pyext.qml --replace-fail NIX_STORE_PACKAGE_PATH ${placeholder "out"} - kpackagetool6 -i ./ -p $out/share/plasma/wallpapers/ - ''; + postInstall = + let + py3-ws = python3.withPackages (ps: with ps; [ websockets ]); + in + '' + cd ../plugin + PATH=${py3-ws}/bin:$PATH patchShebangs --build ./contents/pyext.py + substituteInPlace ./contents/ui/Pyext.qml --replace-fail NIX_STORE_PACKAGE_PATH ${placeholder "out"} + kpackagetool6 -i ./ -p $out/share/plasma/wallpapers/ + ''; meta = with lib; { description = "A KDE wallpaper plugin integrating Wallpaper Engine"; From 35f153ec6e334db49ab4252767d8b5956224c442 Mon Sep 17 00:00:00 2001 From: macronova Date: Fri, 16 Aug 2024 17:59:20 -0700 Subject: [PATCH 3/9] Add CMake flag to find Qt6 --- pkgs/kde/third-party/wallpaper-engine-plugin/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix index 17038ce429d8..6296c19b5124 100644 --- a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix +++ b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix @@ -1,7 +1,6 @@ { extra-cmake-modules, fetchFromGitHub, - full, kpackage, libplasma, lib, @@ -10,6 +9,7 @@ mpv, pkg-config, python3, + qtbase, }: mkKdeDerivation { pname = "wallpaper-engine-kde-plugin"; @@ -32,13 +32,15 @@ mkKdeDerivation { extraBuildInputs = [ extra-cmake-modules - full libplasma lz4 mpv ]; - extraCmakeFlags = [ "-DUSE_PLASMAPKG=ON" ]; + extraCmakeFlags = [ + "-DQt6_DIR=${qtbase}/lib/cmake/Qt6" + "-DUSE_PLASMAPKG=ON" + ]; postInstall = let From 5ba93319d81da028339755243fa405556a2b18d7 Mon Sep 17 00:00:00 2001 From: macronova Date: Sat, 17 Aug 2024 11:29:54 -0700 Subject: [PATCH 4/9] Patch plugin to remove environment dependencies --- pkgs/kde/default.nix | 1 + .../wallpaper-engine-plugin/default.nix | 12 +++++++ .../wallpaper-engine-plugin/nix-plugin.patch | 35 +++++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/pkgs/kde/default.nix b/pkgs/kde/default.nix index b891c223e5ff..9c6930785346 100644 --- a/pkgs/kde/default.nix +++ b/pkgs/kde/default.nix @@ -77,6 +77,7 @@ phonon-vlc = self.callPackage ./misc/phonon-vlc {}; polkit-qt-1 = self.callPackage ./misc/polkit-qt-1 {}; pulseaudio-qt = self.callPackage ./misc/pulseaudio-qt {}; + applet-window-buttons6 = self.callPackage ./third-party/applet-window-buttons6 {}; karousel = self.callPackage ./third-party/karousel {}; kzones = self.callPackage ./third-party/kzones {}; diff --git a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix index 6296c19b5124..38bf59f909ab 100644 --- a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix +++ b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix @@ -10,6 +10,10 @@ pkg-config, python3, qtbase, + qtmultimedia, + qtwebchannel, + qtwebengine, + qtwebsockets, }: mkKdeDerivation { pname = "wallpaper-engine-kde-plugin"; @@ -38,6 +42,14 @@ mkKdeDerivation { ]; extraCmakeFlags = [ + "-DQML2_CMAKE_PATH=${ + lib.makeSearchPath "lib/qt-6/qml" [ + qtmultimedia + qtwebchannel + qtwebengine + qtwebsockets + ] + }" "-DQt6_DIR=${qtbase}/lib/cmake/Qt6" "-DUSE_PLASMAPKG=ON" ]; diff --git a/pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch b/pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch index 042226d6dabe..951250aa407a 100644 --- a/pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch +++ b/pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch @@ -1,3 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e1298ba..1c9ddec 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,6 +9,7 @@ set(KF_MIN_VERSION "5.68.0") + project("WallpaperEngineKde") + + ++add_definitions(-DQML2_CMAKE_PATH="${QML2_CMAKE_PATH}") + set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + if(NOT OpenGL_GL_PREFERENCE) diff --git a/plugin/contents/pyext.py b/plugin/contents/pyext.py old mode 100644 new mode 100755 @@ -15,3 +27,26 @@ index 1a48f5e..8a9c9c9 100644 ].join("\n"); return sh; } +diff --git a/src/plugin.cpp b/src/plugin.cpp +index 5e8a7e2..1709a27 100644 +--- a/src/plugin.cpp ++++ b/src/plugin.cpp +@@ -13,6 +13,18 @@ class Port : public QQmlExtensionPlugin { + Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) + + public: ++ void initializeEngine(QQmlEngine *engine, const char *uri) override { ++ if (strcmp(uri, "com.github.catsout.wallpaperEngineKde") != 0) return; ++ if (!engine) return; ++ ++ QString pathList = QML2_CMAKE_PATH; ++ QStringList paths = pathList.split(':', Qt::SkipEmptyParts); ++ for (const QString &path : paths) { ++ engine->addImportPath(path); ++ } ++ ++ QQmlExtensionPlugin::initializeEngine(engine, uri); ++ } + void registerTypes(const char* uri) override { + if (strcmp(uri, "com.github.catsout.wallpaperEngineKde") != 0) return; + qmlRegisterType(uri, WPVer[0], WPVer[1], "PluginInfo"); From e4c372b37683624290712d7541437f8c06362bb3 Mon Sep 17 00:00:00 2001 From: macronova Date: Sat, 25 Jan 2025 15:59:17 +0800 Subject: [PATCH 5/9] Update patch --- .../wallpaper-engine-plugin/default.nix | 45 +++++++++---------- .../wallpaper-engine-plugin/nix-plugin.patch | 14 +++--- 2 files changed, 27 insertions(+), 32 deletions(-) diff --git a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix index 38bf59f909ab..663624b51dfb 100644 --- a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix +++ b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix @@ -17,17 +17,17 @@ }: mkKdeDerivation { pname = "wallpaper-engine-kde-plugin"; - version = "0.5.5-unstable-2024-06-16"; + version = "0.5.5-unstable-2024-11-03"; src = fetchFromGitHub { owner = "catsout"; repo = "wallpaper-engine-kde-plugin"; - rev = "1e604105c586c7938c5b2c19e3dc8677b2eb4bb4"; - hash = "sha256-bKGQxyS8gUi+37lODLVHphMoQwLKZt/hpSjR5MN+5GA="; + rev = "ed58dd8b920dbb2bf0859ab64e0b5939b8a32a0e"; + hash = "sha256-ICQLtw+qaOMf0lkqKegp+Dkl7eUgPqKDn8Fj5Osb7eA="; fetchSubmodules = true; }; - patches = [ ./nix-plugin.patch ]; + patches = [./nix-plugin.patch]; extraNativeBuildInputs = [ kpackage @@ -42,33 +42,28 @@ mkKdeDerivation { ]; extraCmakeFlags = [ - "-DQML2_CMAKE_PATH=${ - lib.makeSearchPath "lib/qt-6/qml" [ - qtmultimedia - qtwebchannel - qtwebengine - qtwebsockets - ] - }" - "-DQt6_DIR=${qtbase}/lib/cmake/Qt6" - "-DUSE_PLASMAPKG=ON" + (lib.cmakeFeature "QML_LIB" (lib.makeSearchPathOutput "out" "lib/qt-6/qml" [ + qtmultimedia + qtwebchannel + qtwebengine + qtwebsockets + ])) + (lib.cmakeFeature "Qt6_DIR" "${qtbase}/lib/cmake/Qt6") ]; - postInstall = - let - py3-ws = python3.withPackages (ps: with ps; [ websockets ]); - in - '' - cd ../plugin - PATH=${py3-ws}/bin:$PATH patchShebangs --build ./contents/pyext.py - substituteInPlace ./contents/ui/Pyext.qml --replace-fail NIX_STORE_PACKAGE_PATH ${placeholder "out"} - kpackagetool6 -i ./ -p $out/share/plasma/wallpapers/ - ''; + postInstall = let + py3-ws = python3.withPackages (ps: with ps; [websockets]); + in '' + cd $out/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde + chmod +x ./contents/pyext.py + PATH=${py3-ws}/bin:$PATH patchShebangs --build ./contents/pyext.py + substituteInPlace ./contents/ui/Pyext.qml --replace-fail NIX_STORE_PACKAGE_PATH ${placeholder "out"} + ''; meta = with lib; { description = "KDE wallpaper plugin integrating Wallpaper Engine"; homepage = "https://github.com/catsout/wallpaper-engine-kde-plugin"; license = licenses.gpl2Only; - maintainers = with maintainers; [ macronova ]; + maintainers = with maintainers; [macronova]; }; } diff --git a/pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch b/pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch index 951250aa407a..b689f4937946 100644 --- a/pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch +++ b/pkgs/kde/third-party/wallpaper-engine-plugin/nix-plugin.patch @@ -1,12 +1,12 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index e1298ba..1c9ddec 100644 +index e1298ba..1af7d0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ set(KF_MIN_VERSION "5.68.0") project("WallpaperEngineKde") -+add_definitions(-DQML2_CMAKE_PATH="${QML2_CMAKE_PATH}") ++add_definitions(-DQML_LIB="${QML_LIB}") set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true) set(CMAKE_POSITION_INDEPENDENT_CODE ON) if(NOT OpenGL_GL_PREFERENCE) @@ -14,7 +14,7 @@ diff --git a/plugin/contents/pyext.py b/plugin/contents/pyext.py old mode 100644 new mode 100755 diff --git a/plugin/contents/ui/Pyext.qml b/plugin/contents/ui/Pyext.qml -index 1a48f5e..8a9c9c9 100644 +index 1a48f5e..7db2480 100644 --- a/plugin/contents/ui/Pyext.qml +++ b/plugin/contents/ui/Pyext.qml @@ -15,7 +15,8 @@ Item { @@ -22,16 +22,16 @@ index 1a48f5e..8a9c9c9 100644 "[ -f \"$HOME/.local/share/$EXT\" ] && WKD=\"$HOME/.local/share/$EXT\"", "[ -f \"$XDG_DATA_HOME/$EXT\" ] && WKD=\"$XDG_DATA_HOME/$EXT\"", - `exec python3 "$WKD" "${ws_server.url}"` -+ "[ -f \"NIX_STORE_PACKAGE_PATH/share/$EXT\" ] && WKD=\"NIX_STORE_PACKAGE_PATH/share/$EXT\"", ++ "[ -f \"NIX_STORE_PACKAGE_PATH/share/$EXT\" ] && WKD=\"NIX_STORE_PACKAGE_PATH/share/$EXT\"", + `"$WKD" "${ws_server.url}"` ].join("\n"); return sh; } diff --git a/src/plugin.cpp b/src/plugin.cpp -index 5e8a7e2..1709a27 100644 +index 4bc817e..a98cb4a 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp -@@ -13,6 +13,18 @@ class Port : public QQmlExtensionPlugin { +@@ -14,6 +14,18 @@ class Port : public QQmlExtensionPlugin { Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: @@ -39,7 +39,7 @@ index 5e8a7e2..1709a27 100644 + if (strcmp(uri, "com.github.catsout.wallpaperEngineKde") != 0) return; + if (!engine) return; + -+ QString pathList = QML2_CMAKE_PATH; ++ QString pathList = QML_LIB; + QStringList paths = pathList.split(':', Qt::SkipEmptyParts); + for (const QString &path : paths) { + engine->addImportPath(path); From c7e0e9fabefe229278d93744fb33a2a1fdd48f41 Mon Sep 17 00:00:00 2001 From: macronova Date: Sat, 25 Jan 2025 16:02:30 +0800 Subject: [PATCH 6/9] Minor format --- pkgs/kde/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/kde/default.nix b/pkgs/kde/default.nix index bcf74cb22808..76a9d19e28aa 100644 --- a/pkgs/kde/default.nix +++ b/pkgs/kde/default.nix @@ -93,7 +93,7 @@ let koi = self.callPackage ./third-party/koi { }; krohnkite = self.callPackage ./third-party/krohnkite { }; kzones = self.callPackage ./third-party/kzones { }; - wallpaper-engine-plugin = self.callPackage ./third-party/wallpaper-engine-plugin {}; + wallpaper-engine-plugin = self.callPackage ./third-party/wallpaper-engine-plugin { }; } ); in From b6a32aa7066699d5c944334012e12e0d5aa7b6ec Mon Sep 17 00:00:00 2001 From: macronova Date: Sat, 25 Jan 2025 16:06:23 +0800 Subject: [PATCH 7/9] Use nixfmt --- .../wallpaper-engine-plugin/default.nix | 43 +++++-------------- 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix index 663624b51dfb..621a0109d809 100644 --- a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix +++ b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix @@ -1,20 +1,6 @@ -{ - extra-cmake-modules, - fetchFromGitHub, - kpackage, - libplasma, - lib, - lz4, - mkKdeDerivation, - mpv, - pkg-config, - python3, - qtbase, - qtmultimedia, - qtwebchannel, - qtwebengine, - qtwebsockets, -}: +{ extra-cmake-modules, fetchFromGitHub, kpackage, libplasma, lib, lz4 +, mkKdeDerivation, mpv, pkg-config, python3, qtbase, qtmultimedia, qtwebchannel +, qtwebengine, qtwebsockets, }: mkKdeDerivation { pname = "wallpaper-engine-kde-plugin"; version = "0.5.5-unstable-2024-11-03"; @@ -27,19 +13,11 @@ mkKdeDerivation { fetchSubmodules = true; }; - patches = [./nix-plugin.patch]; + patches = [ ./nix-plugin.patch ]; - extraNativeBuildInputs = [ - kpackage - pkg-config - ]; + extraNativeBuildInputs = [ kpackage pkg-config ]; - extraBuildInputs = [ - extra-cmake-modules - libplasma - lz4 - mpv - ]; + extraBuildInputs = [ extra-cmake-modules libplasma lz4 mpv ]; extraCmakeFlags = [ (lib.cmakeFeature "QML_LIB" (lib.makeSearchPathOutput "out" "lib/qt-6/qml" [ @@ -51,19 +29,20 @@ mkKdeDerivation { (lib.cmakeFeature "Qt6_DIR" "${qtbase}/lib/cmake/Qt6") ]; - postInstall = let - py3-ws = python3.withPackages (ps: with ps; [websockets]); + postInstall = let py3-ws = python3.withPackages (ps: with ps; [ websockets ]); in '' cd $out/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde chmod +x ./contents/pyext.py PATH=${py3-ws}/bin:$PATH patchShebangs --build ./contents/pyext.py - substituteInPlace ./contents/ui/Pyext.qml --replace-fail NIX_STORE_PACKAGE_PATH ${placeholder "out"} + substituteInPlace ./contents/ui/Pyext.qml --replace-fail NIX_STORE_PACKAGE_PATH ${ + placeholder "out" + } ''; meta = with lib; { description = "KDE wallpaper plugin integrating Wallpaper Engine"; homepage = "https://github.com/catsout/wallpaper-engine-kde-plugin"; license = licenses.gpl2Only; - maintainers = with maintainers; [macronova]; + maintainers = with maintainers; [ macronova ]; }; } From 7851048caf6c5e41ecd73b06c139c1646d6196d2 Mon Sep 17 00:00:00 2001 From: macronova Date: Tue, 28 Jan 2025 14:45:58 +0800 Subject: [PATCH 8/9] Fix python dep --- .../wallpaper-engine-plugin/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix index 621a0109d809..a14b80983c8b 100644 --- a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix +++ b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix @@ -1,6 +1,6 @@ { extra-cmake-modules, fetchFromGitHub, kpackage, libplasma, lib, lz4 -, mkKdeDerivation, mpv, pkg-config, python3, qtbase, qtmultimedia, qtwebchannel -, qtwebengine, qtwebsockets, }: +, mkKdeDerivation, mpv-unwrapped, pkg-config, python3, qtbase, qtmultimedia +, qtwebchannel, qtwebengine, qtwebsockets, }: mkKdeDerivation { pname = "wallpaper-engine-kde-plugin"; version = "0.5.5-unstable-2024-11-03"; @@ -15,9 +15,13 @@ mkKdeDerivation { patches = [ ./nix-plugin.patch ]; - extraNativeBuildInputs = [ kpackage pkg-config ]; + extraNativeBuildInputs = [ + kpackage + pkg-config + (python3.withPackages (ps: with ps; [ websockets ])) + ]; - extraBuildInputs = [ extra-cmake-modules libplasma lz4 mpv ]; + extraBuildInputs = [ extra-cmake-modules libplasma lz4 mpv-unwrapped ]; extraCmakeFlags = [ (lib.cmakeFeature "QML_LIB" (lib.makeSearchPathOutput "out" "lib/qt-6/qml" [ @@ -29,11 +33,10 @@ mkKdeDerivation { (lib.cmakeFeature "Qt6_DIR" "${qtbase}/lib/cmake/Qt6") ]; - postInstall = let py3-ws = python3.withPackages (ps: with ps; [ websockets ]); - in '' + postInstall = '' cd $out/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde chmod +x ./contents/pyext.py - PATH=${py3-ws}/bin:$PATH patchShebangs --build ./contents/pyext.py + patchShebangs --build ./contents/pyext.py substituteInPlace ./contents/ui/Pyext.qml --replace-fail NIX_STORE_PACKAGE_PATH ${ placeholder "out" } From 526197eff9878135a123516d6bbaab213ab6c2ed Mon Sep 17 00:00:00 2001 From: macronova Date: Tue, 28 Jan 2025 14:55:30 +0800 Subject: [PATCH 9/9] Update key signature and format --- maintainers/maintainer-list.nix | 2 +- .../wallpaper-engine-plugin/default.nix | 47 ++++++++++++++----- 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index fc3cb9791f5c..f7a752116ef8 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -13822,7 +13822,7 @@ matrix = "@macronova:invariantspace.com"; github = "Sicheng-Pan"; githubId = 60079945; - keys = [ { fingerprint = "49D3 FFDA 4D30 DDEE 68EF AE84 EBC4 A200 6737 3921"; } ]; + keys = [ { fingerprint = "7590 C9DD E19D 4497 9EE9 0B14 CE96 9670 FB4B 4A56"; } ]; }; madjar = { email = "georges.dubus@compiletoi.net"; diff --git a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix index a14b80983c8b..4ea13d340dbf 100644 --- a/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix +++ b/pkgs/kde/third-party/wallpaper-engine-plugin/default.nix @@ -1,6 +1,20 @@ -{ extra-cmake-modules, fetchFromGitHub, kpackage, libplasma, lib, lz4 -, mkKdeDerivation, mpv-unwrapped, pkg-config, python3, qtbase, qtmultimedia -, qtwebchannel, qtwebengine, qtwebsockets, }: +{ + extra-cmake-modules, + fetchFromGitHub, + kpackage, + libplasma, + lib, + lz4, + mkKdeDerivation, + mpv-unwrapped, + pkg-config, + python3, + qtbase, + qtmultimedia, + qtwebchannel, + qtwebengine, + qtwebsockets, +}: mkKdeDerivation { pname = "wallpaper-engine-kde-plugin"; version = "0.5.5-unstable-2024-11-03"; @@ -21,15 +35,22 @@ mkKdeDerivation { (python3.withPackages (ps: with ps; [ websockets ])) ]; - extraBuildInputs = [ extra-cmake-modules libplasma lz4 mpv-unwrapped ]; + extraBuildInputs = [ + extra-cmake-modules + libplasma + lz4 + mpv-unwrapped + ]; extraCmakeFlags = [ - (lib.cmakeFeature "QML_LIB" (lib.makeSearchPathOutput "out" "lib/qt-6/qml" [ - qtmultimedia - qtwebchannel - qtwebengine - qtwebsockets - ])) + (lib.cmakeFeature "QML_LIB" ( + lib.makeSearchPathOutput "out" "lib/qt-6/qml" [ + qtmultimedia + qtwebchannel + qtwebengine + qtwebsockets + ] + )) (lib.cmakeFeature "Qt6_DIR" "${qtbase}/lib/cmake/Qt6") ]; @@ -37,9 +58,9 @@ mkKdeDerivation { cd $out/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde chmod +x ./contents/pyext.py patchShebangs --build ./contents/pyext.py - substituteInPlace ./contents/ui/Pyext.qml --replace-fail NIX_STORE_PACKAGE_PATH ${ - placeholder "out" - } + substituteInPlace ./contents/ui/Pyext.qml \ + --replace-fail NIX_STORE_PACKAGE_PATH ${placeholder "out"} + cd - ''; meta = with lib; {