Wallpaper engine plugin for Plasma6

This commit is contained in:
Invariantspace 2024-03-07 21:25:29 -08:00
parent b18c4d6be8
commit 117cd71f52
4 changed files with 79 additions and 9 deletions

View file

@ -0,0 +1,46 @@
{ inputs, name, pkgs }:
pkgs.kdePackages.callPackage
(
{ extra-cmake-modules
, full
, kpackage
, libplasma
, lz4
, mkKdeDerivation
, mpv
, pkg-config
, python-ws
}:
mkKdeDerivation {
extraBuildInputs = [
extra-cmake-modules
full
libplasma
lz4
mpv
];
extraCmakeFlags = [ "-DUSE_PLASMAPKG=ON" ];
extraNativeBuildInputs = [
kpackage
pkg-config
];
pname = name;
postInstall = ''
sed -i "16i \\ \"[ -f \\\\\"\$HOME/.nix-profile/share/\$EXT\\\\\" ] && WKD=\\\\\"\$HOME/.nix-profile/share/\$EXT\\\\\"\"," ../plugin/contents/ui/Pyext.qml
sed -i "s/exec python3 //g" ../plugin/contents/ui/Pyext.qml
chmod +x ../plugin/contents/pyext.py
PATH=${python-ws}/bin:$PATH patchShebangs --build ../plugin/contents/pyext.py
kpackagetool6 -i ../plugin/ -p $out/share/plasma/wallpapers/
'';
src = inputs.${name};
version = "latest";
}
)
{
python-ws = pkgs.python3.withPackages (ps: with ps; [
websockets
]);
}