1{
2 extra-cmake-modules,
3 fetchFromGitHub,
4 kpackage,
5 libplasma,
6 lib,
7 lz4,
8 mkKdeDerivation,
9 mpv-unwrapped,
10 pkg-config,
11 python3,
12 qtbase,
13 qtmultimedia,
14 qtwebchannel,
15 qtwebengine,
16 qtwebsockets,
17}:
18mkKdeDerivation {
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
34 pkg-config
35 (python3.withPackages (ps: with ps; [ websockets ]))
36 ];
37
38 extraBuildInputs = [
39 extra-cmake-modules
40 libplasma
41 lz4
42 mpv-unwrapped
43 ];
44
45 extraCmakeFlags = [
46 (lib.cmakeFeature "QML_LIB" (
47 lib.makeSearchPathOutput "out" "lib/qt-6/qml" [
48 qtmultimedia
49 qtwebchannel
50 qtwebengine
51 qtwebsockets
52 ]
53 ))
54 (lib.cmakeFeature "Qt6_DIR" "${qtbase}/lib/cmake/Qt6")
55 ];
56
57 postInstall = ''
58 cd $out/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde
59 chmod +x ./contents/pyext.py
60 patchShebangs --build ./contents/pyext.py
61 substituteInPlace ./contents/ui/Pyext.qml \
62 --replace-fail NIX_STORE_PACKAGE_PATH ${placeholder "out"}
63 cd -
64 '';
65
66 meta = with lib; {
67 description = "KDE wallpaper plugin integrating Wallpaper Engine";
68 homepage = "https://github.com/catsout/wallpaper-engine-kde-plugin";
69 license = licenses.gpl2Only;
70 maintainers = with maintainers; [ macronova ];
71 teams = [ ];
72 };
73}