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

49 lines
1.2 KiB
Nix
Raw Normal View History

2024-03-07 21:25:29 -08:00
{ inputs, name, pkgs }:
pkgs.kdePackages.callPackage
(
{ extra-cmake-modules
, full
, kpackage
, libplasma
2024-03-23 19:25:07 -07:00
, lib
2024-03-07 21:25:29 -08:00
, lz4
, mkKdeDerivation
, mpv
, pkg-config
, python-ws
}:
mkKdeDerivation {
extraBuildInputs = [
extra-cmake-modules
full
libplasma
lz4
mpv
];
extraCmakeFlags = [ "-DUSE_PLASMAPKG=ON" ];
extraNativeBuildInputs = [
kpackage
pkg-config
];
2024-03-23 19:25:07 -07:00
meta.license = with lib.licenses; [ gpl2 ];
2024-03-07 21:25:29 -08:00
pname = name;
postInstall = ''
chmod +x ../plugin/contents/pyext.py
PATH=${python-ws}/bin:$PATH patchShebangs --build ../plugin/contents/pyext.py
2024-06-16 17:02:20 -07:00
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
2024-03-07 21:25:29 -08:00
kpackagetool6 -i ../plugin/ -p $out/share/plasma/wallpapers/
'';
src = inputs.${name};
version = "latest";
}
)
2024-03-10 13:23:35 -07:00
{
python-ws = pkgs.python3.withPackages (ps: with ps; [
websockets
]);
}
2024-03-07 21:25:29 -08:00