73 lines
2.0 KiB
Nix
73 lines
2.0 KiB
Nix
{ lib, pkgs, inputs ? null, ... }:
|
|
|
|
pkgs.stdenv.mkDerivation rec {
|
|
pname = "wallpaper-engine-kde-plugin";
|
|
version = "unstable-2023-07-01";
|
|
|
|
src = if inputs != null && inputs ? wallpaper-engine-plugin-src
|
|
then inputs.wallpaper-engine-plugin-src
|
|
else pkgs.fetchFromGitHub {
|
|
owner = "catsout";
|
|
repo = "wallpaper-engine-kde-plugin";
|
|
rev = "9e60b364e268814a1a778549c579ad45a9b9c7bb";
|
|
sha256 = "sha256-tKeYJvVa8jzbyZ7MQaOuCUJa+UqABolTNe3e5XNw998=";
|
|
};
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
cmake
|
|
extra-cmake-modules
|
|
pkg-config
|
|
libsForQt5.kpackage
|
|
libsForQt5.plasma-framework
|
|
libsForQt5.kdeclarative
|
|
wrapQtAppsHook
|
|
];
|
|
|
|
buildInputs = with pkgs; [
|
|
mpv lz4 vulkan-headers vulkan-loader
|
|
wayland wayland-protocols
|
|
libass
|
|
spirv-tools
|
|
xorg.libXext
|
|
xorg.libX11
|
|
] ++ (with pkgs.libsForQt5; [
|
|
plasma-framework
|
|
qtwebsockets
|
|
qtwebchannel
|
|
qtx11extras
|
|
qtdeclarative
|
|
qtbase
|
|
qtmultimedia
|
|
dbus
|
|
]);
|
|
|
|
cmakeFlags = [
|
|
"-DUSE_PLASMAPKG=ON"
|
|
"-DQT_MAJOR_VERSION=5"
|
|
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
"-DKDE_INSTALL_PLUGINDIR=${placeholder "out"}/lib/qt5/plugins"
|
|
"-DKDE_INSTALL_QMLDIR=${placeholder "out"}/lib/qt5/qml"
|
|
"-DPLASMA_INSTALL_WALLPAPERDIR=${placeholder "out"}/share/plasma/wallpapers"
|
|
];
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
postInstall = ''
|
|
dest="$out/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde"
|
|
mkdir -p "$dest/contents"
|
|
cp -r ${src}/plugin/contents/* "$dest/contents/"
|
|
cp ${src}/plugin/metadata.desktop "$dest/"
|
|
mkdir -p "$dest/contents/code"
|
|
ln -sf $out/lib/qt5/qml/com/github/catsout/wallpaperEngineKde/libWallpaperEngineKde.so \
|
|
"$dest/contents/code/libWallpaperEngineKde.so"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "KDE wallpaper plugin integrating Wallpaper Engine";
|
|
homepage = "https://github.com/catsout/wallpaper-engine-kde-plugin";
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.linux;
|
|
maintainers = [];
|
|
};
|
|
} |