Update plugin definition

This commit is contained in:
Invariantspace 2023-11-09 16:22:14 -08:00
parent 69de97b39e
commit f528a8f4f0
5 changed files with 68 additions and 36 deletions

10
flake.lock generated
View file

@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1698318101,
"narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=",
"lastModified": 1699099776,
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "63678e9f3d3afecfeafa0acead6239cdb447574c",
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
"type": "github"
},
"original": {
@ -38,7 +38,7 @@
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"wallpaper-engine-kde-plugin-lib": "wallpaper-engine-kde-plugin-lib",
"wallpaper-engine-kde-plugin": "wallpaper-engine-kde-plugin",
"yorha-grub-theme": "yorha-grub-theme"
}
},
@ -57,7 +57,7 @@
"type": "github"
}
},
"wallpaper-engine-kde-plugin-lib": {
"wallpaper-engine-kde-plugin": {
"flake": false,
"locked": {
"lastModified": 1697944637,

View file

@ -4,7 +4,7 @@
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
wallpaper-engine-kde-plugin-lib = {
wallpaper-engine-kde-plugin = {
flake = false;
url = "git+https://github.com/catsout/wallpaper-engine-kde-plugin?submodules=1";
};

View file

@ -1,28 +0,0 @@
{ inputs, name, pkgs }:
with pkgs; stdenv.mkDerivation {
inherit name;
src = inputs.${name};
nativeBuildInputs = [
cmake
extra-cmake-modules
];
buildInputs = with libsForQt5; [
plasma-framework
plasma-workspace
qt5.qtx11extras
qt5.qtdeclarative
qt5.qtwebchannel
qt5.wrapQtAppsHook
] ++ [
gst_all_1.gst-libav
lz4
mujs
mpv-unwrapped
shaderc
vulkan-headers
vulkan-loader
wayland
];
cmakeFlags = [ "-DUSE_PLASMAPKG=ON" ];
}

View file

@ -0,0 +1,60 @@
{ 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 "16i \\ \"[ -f \\\\\"\$HOME/.nix-profile/share/\$EXT\\\\\" ] && WKD=\\\\\"\$HOME/.nix-profile/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
]);
})