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,60 @@
{ inputs, name, pkgs }:
pkgs.plasma5Packages.callPackage
(
{ mkDerivation
, cmake
, extra-cmake-modules
, gst-libav
, lz4
, mpv
, pkg-config
, python-ws
, plasma-framework
, qtdeclarative
, qtwebsockets
, qtwebchannel
, qtx11extras
, vulkan-headers
, vulkan-loader
, vulkan-tools
, websockets
}:
mkDerivation {
inherit name;
cmakeFlags = [ "-DUSE_PLASMAPKG=ON" ];
nativeBuildInputs = [ cmake extra-cmake-modules pkg-config ];
buildInputs = [
lz4
mpv
plasma-framework
python-ws
qtdeclarative
qtwebchannel
qtwebsockets
qtx11extras
vulkan-headers
vulkan-tools
vulkan-loader
websockets
];
postInstall = ''
chmod +x ../plugin/contents/pyext.py
PATH=${python-ws}/bin:$PATH patchShebangs --build ../plugin/contents/pyext.py
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
mkdir -p $out/share/plasma/wallpapers/com.github.casout.wallpaperEngineKde/
cp -r ../plugin/* $out/share/plasma/wallpapers/com.github.casout.wallpaperEngineKde/
'';
src = inputs.${name};
}
)
(with pkgs; {
inherit (gst_all_1) gst-libav;
inherit (python3Packages) websockets;
python-ws = python3.withPackages (ps: with ps; [
websockets
]);
})