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.
This commit is contained in:
Wolfgang Walther
2025-06-18 19:09:52 +02:00
parent baa3f5172c
commit 37fda8bd49
+1 -1
View File
@@ -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 =