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:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user