Wallpaper engine plugin for Plasma6

This commit is contained in:
Invariantspace 2024-03-07 21:25:29 -08:00
parent b18c4d6be8
commit 117cd71f52
4 changed files with 79 additions and 9 deletions

36
flake.lock generated
View file

@ -5,11 +5,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1705309234, "lastModified": 1709126324,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -20,11 +20,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1708475490, "lastModified": 1709703039,
"narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=", "narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0e74ca98a74bc7270d28838369593635a5db3260", "rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -38,7 +38,8 @@
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"wallpaper-engine-kde-plugin": "wallpaper-engine-kde-plugin", "wallpaper-engine-plasma5-plugin": "wallpaper-engine-plasma5-plugin",
"wallpaper-engine-plasma6-plugin": "wallpaper-engine-plasma6-plugin",
"yorha-grub-theme": "yorha-grub-theme", "yorha-grub-theme": "yorha-grub-theme",
"yorha-sound-theme": "yorha-sound-theme" "yorha-sound-theme": "yorha-sound-theme"
} }
@ -58,7 +59,7 @@
"type": "github" "type": "github"
} }
}, },
"wallpaper-engine-kde-plugin": { "wallpaper-engine-plasma5-plugin": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1708352840, "lastModified": 1708352840,
@ -76,6 +77,25 @@
"url": "https://github.com/catsout/wallpaper-engine-kde-plugin" "url": "https://github.com/catsout/wallpaper-engine-kde-plugin"
} }
}, },
"wallpaper-engine-plasma6-plugin": {
"flake": false,
"locked": {
"lastModified": 1709859681,
"narHash": "sha256-umQ1R+XenuNze2xdFGauQZ/an6Q0zN/BG/8TDQsV0jM=",
"ref": "qt6",
"rev": "8a111b99405bd092974cd9bac654a83d4c3e86c2",
"revCount": 590,
"submodules": true,
"type": "git",
"url": "https://github.com/catsout/wallpaper-engine-kde-plugin"
},
"original": {
"ref": "qt6",
"submodules": true,
"type": "git",
"url": "https://github.com/catsout/wallpaper-engine-kde-plugin"
}
},
"yorha-grub-theme": { "yorha-grub-theme": {
"flake": false, "flake": false,
"locked": { "locked": {

View file

@ -4,10 +4,14 @@
inputs = { inputs = {
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
wallpaper-engine-kde-plugin = { wallpaper-engine-plasma5-plugin = {
flake = false; flake = false;
url = "git+https://github.com/catsout/wallpaper-engine-kde-plugin?submodules=1"; url = "git+https://github.com/catsout/wallpaper-engine-kde-plugin?submodules=1";
}; };
wallpaper-engine-plasma6-plugin = {
flake = false;
url = "git+https://github.com/catsout/wallpaper-engine-kde-plugin?ref=qt6&submodules=1";
};
yorha-grub-theme = { yorha-grub-theme = {
flake = false; flake = false;
url = "github:OliveThePuffin/yorha-grub-theme"; url = "github:OliveThePuffin/yorha-grub-theme";

View file

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