hyprlandPlugins.mkHyprlandPlugin: support finalAttrs through lib.extendMkDerivation; update hyprland plugins (#443076)

authored by Austin Horstman and committed by GitHub fd6c07a0 f50c71c7

+46 -37
+23 -11
pkgs/applications/window-managers/hyprwm/hyprland-plugins/default.nix
··· 3 3 lib, 4 4 callPackage, 5 5 pkg-config, 6 - }: 6 + hyprland, 7 + }@topLevelArgs: 7 8 let 8 - mkHyprlandPlugin = 9 - hyprland: 10 - args@{ pluginName, ... }: 11 - hyprland.stdenv.mkDerivation ( 12 - args 13 - // { 9 + 10 + mkHyprlandPlugin = lib.extendMkDerivation { 11 + constructDrv = topLevelArgs.hyprland.stdenv.mkDerivation; 12 + 13 + extendDrvArgs = 14 + finalAttrs: 15 + { 16 + pluginName ? "", 17 + nativeBuildInputs ? [ ], 18 + buildInputs ? [ ], 19 + hyprland ? topLevelArgs.hyprland, 20 + ... 21 + }@args: 22 + 23 + { 14 24 pname = "${pluginName}"; 15 - nativeBuildInputs = [ pkg-config ] ++ args.nativeBuildInputs or [ ]; 16 - buildInputs = [ hyprland ] ++ hyprland.buildInputs ++ (args.buildInputs or [ ]); 25 + nativeBuildInputs = [ pkg-config ] ++ nativeBuildInputs; 26 + buildInputs = [ hyprland ] ++ hyprland.buildInputs ++ buildInputs; 17 27 meta = args.meta // { 18 28 description = args.meta.description or ""; 19 29 longDescription = 20 30 (args.meta.longDescription or "") 21 31 + "\n\nPlugins can be installed via a plugin entry in the Hyprland NixOS or Home Manager options."; 32 + 33 + platforms = args.meta.platforms or hyprland.meta.platforms or [ ]; 22 34 }; 23 - } 24 - ); 35 + }; 36 + }; 25 37 26 38 plugins = lib.mergeAttrsList [ 27 39 { hy3 = import ./hy3.nix; }
+11 -6
pkgs/applications/window-managers/hyprwm/hyprland-plugins/hy3.nix
··· 6 6 mkHyprlandPlugin, 7 7 nix-update-script, 8 8 }: 9 - mkHyprlandPlugin hyprland rec { 9 + mkHyprlandPlugin (finalAttrs: { 10 10 pluginName = "hy3"; 11 - version = "hl0.50.0"; 11 + version = "0.51.0"; 12 12 13 13 src = fetchFromGitHub { 14 14 owner = "outfoxxed"; 15 15 repo = "hy3"; 16 - tag = version; 17 - hash = "sha256-1BTJSqkj+lkIry27HuqA5UB7uRqAUvGT7LAUDQhKjU0="; 16 + tag = "hl${finalAttrs.version}"; 17 + hash = "sha256-HjbofK4rSLkkUvOZHdoAY6kn7Ok2bXo14eOKr8hKRHE="; 18 18 }; 19 19 20 20 nativeBuildInputs = [ cmake ]; 21 21 22 22 dontStrip = true; 23 23 24 - passthru.updateScript = nix-update-script { }; 24 + passthru.updateScript = nix-update-script { 25 + extraArgs = [ 26 + "--version-regex" 27 + "hl(.*)" 28 + ]; 29 + }; 25 30 26 31 meta = { 27 32 homepage = "https://github.com/outfoxxed/hy3"; ··· 33 38 johnrtitor 34 39 ]; 35 40 }; 36 - } 41 + })
+3 -4
pkgs/applications/window-managers/hyprwm/hyprland-plugins/hycov.nix
··· 1 1 { 2 2 lib, 3 3 mkHyprlandPlugin, 4 - hyprland, 5 4 cmake, 6 5 fetchFromGitHub, 7 6 nix-update-script, 8 7 }: 9 8 10 - mkHyprlandPlugin hyprland rec { 9 + mkHyprlandPlugin (finalAttrs: { 11 10 pluginName = "hycov"; 12 11 version = "0.41.2.1"; 13 12 14 13 src = fetchFromGitHub { 15 14 owner = "DreamMaoMao"; 16 15 repo = "hycov"; 17 - rev = version; 16 + tag = finalAttrs.version; 18 17 hash = "sha256-NRnxbkuiq1rQ+uauo7D+CEe73iGqxsWxTQa+1SEPnXQ="; 19 18 }; 20 19 ··· 30 29 platforms = lib.platforms.linux; 31 30 broken = true; # Doesn't work after Hyprland v0.41.2 https://gitee.com/DreamMaoMao/hycov/issues/IANYC8#note_31512295_link 32 31 }; 33 - } 32 + })
+1 -2
pkgs/applications/window-managers/hyprwm/hyprland-plugins/hypr-dynamic-cursors.nix
··· 2 2 lib, 3 3 mkHyprlandPlugin, 4 4 fetchFromGitHub, 5 - hyprland, 6 5 nix-update-script, 7 6 }: 8 7 9 - mkHyprlandPlugin hyprland { 8 + mkHyprlandPlugin { 10 9 pluginName = "hypr-dynamic-cursors"; 11 10 version = "0-unstable-2025-09-01"; 12 11
+1 -2
pkgs/applications/window-managers/hyprwm/hyprland-plugins/hyprgrass.nix
··· 1 1 { 2 2 lib, 3 3 mkHyprlandPlugin, 4 - hyprland, 5 4 fetchFromGitHub, 6 5 cmake, 7 6 doctest, ··· 11 10 nix-update-script, 12 11 }: 13 12 14 - mkHyprlandPlugin hyprland { 13 + mkHyprlandPlugin { 15 14 pluginName = "hyprgrass"; 16 15 version = "0.8.2-unstable-2025-05-08"; 17 16
+3 -5
pkgs/applications/window-managers/hyprwm/hyprland-plugins/hyprland-plugins.nix
··· 10 10 lib, 11 11 cmake, 12 12 fetchFromGitHub, 13 - hyprland, 14 13 mkHyprlandPlugin, 15 14 }: 16 15 let 17 - version = "0.50.0"; 16 + version = "0.51.0"; 18 17 19 18 hyprland-plugins-src = fetchFromGitHub { 20 19 owner = "hyprwm"; 21 20 repo = "hyprland-plugins"; 22 21 tag = "v${version}"; 23 - hash = "sha256-XJJ+frO4NOxVkoSGc1Mag8ESumzx2FmVRspOgFlMqF8="; 22 + hash = "sha256-6jAtMjnWq8kty/dpPbIKxIupUG+WAE2AKMIKhxdLYNo="; 24 23 }; 25 24 in 26 - mkHyprlandPlugin hyprland { 25 + mkHyprlandPlugin { 27 26 pluginName = name; 28 27 inherit version; 29 28 ··· 34 33 description = "Hyprland ${description} plugin"; 35 34 license = lib.licenses.bsd3; 36 35 teams = [ lib.teams.hyprland ]; 37 - inherit (hyprland.meta) platforms; 38 36 }; 39 37 } 40 38 )
+1 -2
pkgs/applications/window-managers/hyprwm/hyprland-plugins/hyprspace.nix
··· 1 1 { 2 2 lib, 3 3 fetchFromGitHub, 4 - hyprland, 5 4 mkHyprlandPlugin, 6 5 nix-update-script, 7 6 }: 8 7 9 - mkHyprlandPlugin hyprland { 8 + mkHyprlandPlugin { 10 9 pluginName = "hyprspace"; 11 10 version = "0-unstable-2025-07-16"; 12 11
+3 -5
pkgs/applications/window-managers/hyprwm/hyprland-plugins/hyprsplit.nix
··· 2 2 lib, 3 3 meson, 4 4 fetchFromGitHub, 5 - hyprland, 6 5 ninja, 7 6 mkHyprlandPlugin, 8 7 nix-update-script, 9 8 }: 10 - mkHyprlandPlugin hyprland rec { 9 + mkHyprlandPlugin (finalAttrs: { 11 10 pluginName = "hyprsplit"; 12 11 version = "0.50.1"; 13 12 14 13 src = fetchFromGitHub { 15 14 owner = "shezdy"; 16 15 repo = "hyprsplit"; 17 - tag = "v${version}"; 16 + tag = "v${finalAttrs.version}"; 18 17 hash = "sha256-D0zfdUJXBRnNMmv/5qW+X4FJJ3/+t7yQmwJFkBuEgck="; 19 18 }; 20 19 ··· 29 28 homepage = "https://github.com/shezdy/hyprsplit"; 30 29 description = "Hyprland plugin for awesome / dwm like workspaces"; 31 30 license = lib.licenses.bsd3; 32 - inherit (hyprland.meta) platforms; 33 31 maintainers = with lib.maintainers; [ 34 32 aacebedo 35 33 ]; 36 34 }; 37 - } 35 + })