-
-
Notifications
You must be signed in to change notification settings - Fork 346
modules/nixpkgs: add overlays
option
#2430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9767466
to
3a595aa
Compare
modules/top-level/nixpkgs.nix
Outdated
[ | ||
(self: super: { | ||
openssh = super.openssh.override { | ||
hpnSupport = true; | ||
kerberos = self.libkrb5; | ||
}; | ||
}) | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any ideas for a better vim-related example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was wondering if we could do one that adds a tree-sitter-X grammar to the treesitter package ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(self: super: { neovim-unwrapped = inputs.neovim-nightly-overlay.packages.${system}.default; })
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a few examples. Happy to iterate further on them and/or remove some of them. Either in this PR or a follow up.
3a595aa
to
6b98813
Compare
6b98813
to
b2eb3df
Compare
We can throw inline to ensure our error is displayed before any attempt to use the (non-existent) `pkgs` arg results in a less helpful error.
Based on the `nixpkgs.overlays` option available in NixOS, allows users to further customize the `pkgs` instance used when evaluating nixvim. The standard module tests are now provided a few extra module args to enable a test where we instantiate a custom nixpkgs instance.
b2eb3df
to
c4ad4d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at c4ad4d0 |
This pull request, with head sha This pull request will be automatically closed by GitHub.As soon as GitHub detects that the sha It is possible for this pull request to remain open if this detection does not happen, this usually happens when a force-push is done on this branch |
nixpkgs.pkgs.isDefined
assertionoverlays
optionFollow up to #2301 and working towards #1784; this PR adds the
nixpkgs.overlays
option.This change is supported by some related refactoring to the existing assertion to a) reduce future indentation changes to the module and b) ensure the assertion message is actually shown to users. Without this change,
_module.args.pkgs
being absent will cause other errors that get thrown before we are able to check the module assertions.Additionally, I've added a test to ensure the new option works correctly.
I would like a better option example for
nixpkgs.overlays
. Currently I'm using the same example as NixOS. Perhaps we could do something using thevimPlugins = prev.vimPlugins.extend
pattern? IDK, struggling to find "useful" real-world examples that are small and obvious enough to be a good example.