diff --git a/flake.lock b/flake.lock index c1cd84a..c24b9db 100644 --- a/flake.lock +++ b/flake.lock @@ -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, diff --git a/flake.nix b/flake.nix index cdad9df..d22db89 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; }; diff --git a/packages/wallpaper-engine-kde-plugin-lib.nix b/packages/wallpaper-engine-kde-plugin-lib.nix deleted file mode 100644 index 770b4c5..0000000 --- a/packages/wallpaper-engine-kde-plugin-lib.nix +++ /dev/null @@ -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" ]; -} diff --git a/packages/wallpaper-engine-kde-plugin.nix b/packages/wallpaper-engine-kde-plugin.nix new file mode 100644 index 0000000..e35ac03 --- /dev/null +++ b/packages/wallpaper-engine-kde-plugin.nix @@ -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 + ]); +}) + diff --git a/packages/yorha-grub-theme.nix b/packages/yorha-grub-theme.nix index 914da13..0eb471d 100644 --- a/packages/yorha-grub-theme.nix +++ b/packages/yorha-grub-theme.nix @@ -6,9 +6,9 @@ pkgs.stdenv.mkDerivation { inherit name; src = inputs.${name}; installPhase = '' - runHook preInstall + runHook preInstall mkdir -p $out/ - cp -r yorha-${resolution}/* $out/ + cp -r yorha-${resolution}/* $out/ runHook postInstall ''; }