60 lines
1.6 KiB
Nix
60 lines
1.6 KiB
Nix
{ 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 "18i \\ \"[ -f \\\\\"${placeholder "out"}/share/\$EXT\\\\\" ] && WKD=\\\\\"${placeholder "out"}/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
|
|
]);
|
|
})
|
|
|