From 37fda8bd49f673ab2a87eb19e19f83f3923beb49 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Wed, 18 Jun 2025 19:09:52 +0200 Subject: [PATCH] tmuxPlugins: allow simple overrideAttrs without function Regular `overrideAttrs` also supports passing a plain attribute set. Before this PR: ``` nix-repl> tmuxPlugins.battery.overrideAttrs { pname = "my-battery"; } error: attempt to call something which is not a function but a set: { pname = "my-battery"; } ``` After, it works. --- pkgs/misc/tmux-plugins/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix index 8cc8f8200cd5..a9bb41c56b00 100644 --- a/pkgs/misc/tmux-plugins/default.nix +++ b/pkgs/misc/tmux-plugins/default.nix @@ -16,7 +16,7 @@ let rtp = "${derivation}/${path}/${rtpFilePath}"; } // { - overrideAttrs = f: mkTmuxPlugin (attrs // f attrs); + overrideAttrs = f: mkTmuxPlugin (attrs // (if lib.isFunction f then f attrs else f)); }; mkTmuxPlugin =