I have a question about the documentation of "How do i use a plugin not packaged in nixpkgs?" #2083
-
About this: https://nix-community.github.io/nixvim/user-guide/faq.html?highlight=plugins#how-do-i-use-a-plugin-not-packaged-in-nixpkgs. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, this is the same as how nixpkgs is implemented. Contributors manually update versions and hashes in PRs to nixpkgs. However, if you're using flakes, you could take advantage of your flake inputs (and therefore your flake lock) to handle this for you when you run I don't have a solid example ready and I don't fancy typing one up on my phone keyboard, but essentially you would have to pass your flake inputs into your modules via Alternatively, you could define the package elsewhere in your flake (e.g. your flakes But there are limitations to this technique; you'll generally need to follow a git branch with flake inputs (although inputs don't need to be other flakes). This means it's hard to follow a stable version of some software; you could pin to a release tag, but then you won't get updates since release tags generally don't change. |
Beta Was this translation helpful? Give feedback.
Yes, this is the same as how nixpkgs is implemented. Contributors manually update versions and hashes in PRs to nixpkgs.
However, if you're using flakes, you could take advantage of your flake inputs (and therefore your flake lock) to handle this for you when you run
nix flake update
.I don't have a solid example ready and I don't fancy typing one up on my phone keyboard, but essentially you would have to pass your flake inputs into your modules via
specialArgs
, then use the input in question as thesrc
attr.Alternatively, you could define the package elsewhere in your flake (e.g. your flakes
packages
output) and then pass that into your modules somehow.But there are limitations to this…