Unverified Commit fd6c07a0 authored by Austin Horstman's avatar Austin Horstman Committed by GitHub
Browse files

hyprlandPlugins.mkHyprlandPlugin: support finalAttrs through...

hyprlandPlugins.mkHyprlandPlugin: support finalAttrs through lib.extendMkDerivation; update hyprland plugins (#443076)
parents f50c71c7 8a67c5a5
Loading
Loading
Loading
Loading
+23 −11
Original line number Diff line number Diff line
@@ -3,25 +3,37 @@
  lib,
  callPackage,
  pkg-config,
}:
  hyprland,
}@topLevelArgs:
let
  mkHyprlandPlugin =
    hyprland:
    args@{ pluginName, ... }:
    hyprland.stdenv.mkDerivation (
      args
      // {

  mkHyprlandPlugin = lib.extendMkDerivation {
    constructDrv = topLevelArgs.hyprland.stdenv.mkDerivation;

    extendDrvArgs =
      finalAttrs:
      {
        pluginName ? "",
        nativeBuildInputs ? [ ],
        buildInputs ? [ ],
        hyprland ? topLevelArgs.hyprland,
        ...
      }@args:

      {
        pname = "${pluginName}";
        nativeBuildInputs = [ pkg-config ] ++ args.nativeBuildInputs or [ ];
        buildInputs = [ hyprland ] ++ hyprland.buildInputs ++ (args.buildInputs or [ ]);
        nativeBuildInputs = [ pkg-config ] ++ nativeBuildInputs;
        buildInputs = [ hyprland ] ++ hyprland.buildInputs ++ buildInputs;
        meta = args.meta // {
          description = args.meta.description or "";
          longDescription =
            (args.meta.longDescription or "")
            + "\n\nPlugins can be installed via a plugin entry in the Hyprland NixOS or Home Manager options.";

          platforms = args.meta.platforms or hyprland.meta.platforms or [ ];
        };
      };
  };
      }
    );

  plugins = lib.mergeAttrsList [
    { hy3 = import ./hy3.nix; }
+11 −6
Original line number Diff line number Diff line
@@ -6,22 +6,27 @@
  mkHyprlandPlugin,
  nix-update-script,
}:
mkHyprlandPlugin hyprland rec {
mkHyprlandPlugin (finalAttrs: {
  pluginName = "hy3";
  version = "hl0.50.0";
  version = "0.51.0";

  src = fetchFromGitHub {
    owner = "outfoxxed";
    repo = "hy3";
    tag = version;
    hash = "sha256-1BTJSqkj+lkIry27HuqA5UB7uRqAUvGT7LAUDQhKjU0=";
    tag = "hl${finalAttrs.version}";
    hash = "sha256-HjbofK4rSLkkUvOZHdoAY6kn7Ok2bXo14eOKr8hKRHE=";
  };

  nativeBuildInputs = [ cmake ];

  dontStrip = true;

  passthru.updateScript = nix-update-script { };
  passthru.updateScript = nix-update-script {
    extraArgs = [
      "--version-regex"
      "hl(.*)"
    ];
  };

  meta = {
    homepage = "https://github.com/outfoxxed/hy3";
@@ -33,4 +38,4 @@ mkHyprlandPlugin hyprland rec {
      johnrtitor
    ];
  };
}
})
+3 −4
Original line number Diff line number Diff line
{
  lib,
  mkHyprlandPlugin,
  hyprland,
  cmake,
  fetchFromGitHub,
  nix-update-script,
}:

mkHyprlandPlugin hyprland rec {
mkHyprlandPlugin (finalAttrs: {
  pluginName = "hycov";
  version = "0.41.2.1";

  src = fetchFromGitHub {
    owner = "DreamMaoMao";
    repo = "hycov";
    rev = version;
    tag = finalAttrs.version;
    hash = "sha256-NRnxbkuiq1rQ+uauo7D+CEe73iGqxsWxTQa+1SEPnXQ=";
  };

@@ -30,4 +29,4 @@ mkHyprlandPlugin hyprland rec {
    platforms = lib.platforms.linux;
    broken = true; # Doesn't work after Hyprland v0.41.2 https://gitee.com/DreamMaoMao/hycov/issues/IANYC8#note_31512295_link
  };
}
})
+1 −2
Original line number Diff line number Diff line
@@ -2,11 +2,10 @@
  lib,
  mkHyprlandPlugin,
  fetchFromGitHub,
  hyprland,
  nix-update-script,
}:

mkHyprlandPlugin hyprland {
mkHyprlandPlugin {
  pluginName = "hypr-dynamic-cursors";
  version = "0-unstable-2025-09-01";

+1 −2
Original line number Diff line number Diff line
{
  lib,
  mkHyprlandPlugin,
  hyprland,
  fetchFromGitHub,
  cmake,
  doctest,
@@ -11,7 +10,7 @@
  nix-update-script,
}:

mkHyprlandPlugin hyprland {
mkHyprlandPlugin {
  pluginName = "hyprgrass";
  version = "0.8.2-unstable-2025-05-08";

Loading