Skip to content

I have a question about the documentation of "How do i use a plugin not packaged in nixpkgs?" #2083

Answered by MattSturgeon
refaelsh asked this question in Q&A
Discussion options

You must be logged in to vote

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 the src 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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@refaelsh
Comment options

Answer selected by refaelsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants