nix-custom/packages/wallpaper-engine-kde-plugin.nix

61 lines
1.6 KiB
Nix
Raw Normal View History

2023-11-09 16:22:14 -08:00
{ 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};
}
)
2023-11-22 20:26:55 -08:00
(with pkgs; {
inherit (gst_all_1) gst-libav;
inherit (python3Packages) websockets;
python-ws = python3.withPackages (ps: with ps; [
websockets
]);
})
2023-11-09 16:22:14 -08:00