nix-custom/packages/wallpaper-engine-plasma6-plugin.nix
2024-06-15 17:35:22 -07:00

47 lines
1,005 B
Nix

{ inputs, name, pkgs }:
pkgs.kdePackages.callPackage
(
{ extra-cmake-modules
, full
, kpackage
, libplasma
, lib
, lz4
, mkKdeDerivation
, mpv
, pkg-config
, python-ws
}:
mkKdeDerivation {
extraBuildInputs = [
extra-cmake-modules
full
libplasma
lz4
mpv
];
extraCmakeFlags = [ "-DUSE_PLASMAPKG=ON" ];
extraNativeBuildInputs = [
kpackage
pkg-config
];
meta.license = with lib.licenses; [ gpl2 ];
pname = name;
postInstall = ''
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
]);
}