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