From 45558c87aebeac02a5117330dd4ad2bb3f08e703 Mon Sep 17 00:00:00 2001 From: macronova Date: Fri, 11 Aug 2023 19:51:41 -0700 Subject: [PATCH] Package wallpaper-engine-kde-plugin-lib --- README.md | 2 +- flake.lock | 78 ++++++++++++++++++++ flake.nix | 32 ++++++++ packages/wallpaper-engine-kde-plugin-lib.nix | 28 +++++++ 4 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 packages/wallpaper-engine-kde-plugin-lib.nix diff --git a/README.md b/README.md index 6fc4287..49486a5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # nix-custom -Collection of custom nix packages \ No newline at end of file +Collection of custom Nix packages \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..b61dc29 --- /dev/null +++ b/flake.lock @@ -0,0 +1,78 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1691654369, + "narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "wallpaper-engine-kde-plugin-lib": "wallpaper-engine-kde-plugin-lib" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "wallpaper-engine-kde-plugin-lib": { + "flake": false, + "locked": { + "lastModified": 1691303010, + "narHash": "sha256-b+wZCIymddew5jsaZFHOnevSb5DDxMu7WnG8Oiz2eZ8=", + "owner": "catsout", + "repo": "wallpaper-engine-kde-plugin", + "rev": "f972b2a24c9c3cc2d3e4f41d2ebd14f1473cebdf", + "type": "github" + }, + "original": { + "owner": "catsout", + "repo": "wallpaper-engine-kde-plugin", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b15804f --- /dev/null +++ b/flake.nix @@ -0,0 +1,32 @@ +{ + description = "Collection of custom Nix packages"; + + inputs = { + flake-utils.url = "github:numtide/flake-utils"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + wallpaper-engine-kde-plugin-lib = { + flake = false; + url = "git+https://github.com/catsout/wallpaper-engine-kde-plugin?submodules=1"; + }; + }; + + outputs = inputs@{ self, flake-utils, nixpkgs, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + pkgDefDir = ./packages; + pkgDefs = pkgs.lib.attrsets.mapAttrs' + (pkgDef: _: { + name = builtins.substring 0 + ( + builtins.sub (builtins.stringLength pkgDef) 4 + ) + pkgDef; + value = import (pkgDefDir + "/${pkgDef}") { inherit inputs pkgs; }; + }) + (builtins.readDir pkgDefDir); + in + { + packages = pkgDefs; + }); +} diff --git a/packages/wallpaper-engine-kde-plugin-lib.nix b/packages/wallpaper-engine-kde-plugin-lib.nix new file mode 100644 index 0000000..106f74d --- /dev/null +++ b/packages/wallpaper-engine-kde-plugin-lib.nix @@ -0,0 +1,28 @@ +{ inputs, pkgs }: + +with pkgs; stdenv.mkDerivation rec { + name = "wallpaper-engine-kde-plugin-lib"; + 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" ]; +}