neovimUtils.buildNeovimPlugin: use version from derivation if missing (#288251)

Trying to use:
`plugin = pkgs.neovimUtils.buildNeovimPlugin { luaAttr = "rocks-nvim"; };`

fails with:

```
error: attribute 'version' missing

at /nix/store/0ww4wsg5q5hmnzv06a0k1q32jc49y7gi-source/pkgs/applications/editors/neovim/build-neovim-plugin.nix:28:19:

    27|         })).overrideAttrs (drv: {
    28|         version = attrs.version;
	|                   ^
    29|         rockspecVersion = drv.rockspecVersion;
```

This PR fixes it.
This commit is contained in:
Matthieu Coudron 2024-02-12 11:15:54 +01:00 committed by GitHub
parent 4a9a73c626
commit bd6def34e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,7 +25,7 @@ in
lua_modules_path = "lua"
'';
})).overrideAttrs (drv: {
version = attrs.version;
version = attrs.version or drv.version;
rockspecVersion = drv.rockspecVersion;
});