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

70 lines
1.5 KiB
Nix
Raw Normal View History

2024-09-15 18:34:27 -07:00
{
inputs,
name,
pkgs,
}:
pkgs.kdePackages.callPackage (
{
extra-cmake-modules,
kpackage,
libplasma,
lib,
lz4,
mkKdeDerivation,
mpv,
pkg-config,
python3,
qtbase,
qtmultimedia,
qtwebchannel,
qtwebengine,
qtwebsockets,
}:
mkKdeDerivation {
pname = name;
version = "latest";
2024-03-07 21:25:29 -08:00
2024-09-15 18:34:27 -07:00
src = inputs.${name};
patches = [./${name}.patch];
extraNativeBuildInputs = [
kpackage
pkg-config
];
2024-03-07 21:25:29 -08:00
extraBuildInputs = [
extra-cmake-modules
libplasma
lz4
mpv
];
2024-09-15 18:34:27 -07:00
extraCmakeFlags = [
2025-01-25 15:42:15 +08:00
(lib.cmakeFeature "QML_LIB" (lib.makeSearchPathOutput "out" "lib/qt-6/qml" [
2024-09-15 18:34:27 -07:00
qtmultimedia
qtwebchannel
2025-01-25 15:42:15 +08:00
qtwebengine
2024-09-15 18:34:27 -07:00
qtwebsockets
2025-01-25 15:42:15 +08:00
]))
(lib.cmakeFeature "Qt6_DIR" "${qtbase}/lib/cmake/Qt6")
2024-03-07 21:25:29 -08:00
];
2024-09-15 18:34:27 -07:00
postInstall = let
py3-ws = python3.withPackages (ps: with ps; [websockets]);
in ''
2025-01-25 15:42:15 +08:00
cd $out/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde
chmod +x ./contents/pyext.py
2024-09-15 18:34:27 -07:00
PATH=${py3-ws}/bin:$PATH patchShebangs --build ./contents/pyext.py
substituteInPlace ./contents/ui/Pyext.qml --replace-fail NIX_STORE_PACKAGE_PATH ${placeholder "out"}
2024-03-07 21:25:29 -08:00
'';
2024-09-15 18:34:27 -07:00
meta = with lib; {
description = "KDE wallpaper plugin integrating Wallpaper Engine";
homepage = "https://github.com/catsout/wallpaper-engine-kde-plugin";
license = licenses.gpl2Only;
};
}
)
{}