-
Notifications
You must be signed in to change notification settings - Fork 331
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
fix: avoid eval error by discouraging overzealus module signatures #416
Conversation
Stuff like this: error: attribute 'pre-commit-hooks' missing
at /nix/store/h3vlwnvhbkjlck4ps694kmz20jwvgscc-source/lib/modules.nix:483:28:
482| builtins.addErrorContext (context name)
483| (args.${name} or config._module.args.${name})
| ^
484| ) (lib.functionArgs f);
(use '--show-trace' to show detailed location information)
/nix/store/1c147j530hi4p2v5dlpg5x9dm309pivi-source/direnv_lib.s The following consumption pattern is fixed by this change: {
inputs.devenv.url = "github:cachix/devenv?dir=src/modules";
} |
68ed06a
to
7de4420
Compare
boah, I guess we need an integration point for
|
Uncomfortable, but works: {
eval = module: (lib.evalModules {
modules = [
(devenv.modules + /top-level.nix)
{
disabledModules = []
++ (listEntries (devenv.modules + /integrations))
++ (listEntries (devenv.modules + /languages))
;
}
module
];
specialArgs = {
pkgs = nixpkgs;
inherit inputs;
};
}).config; Maybe this should become an issue? |
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 like that this makes pre-commit-hooks less special 👍 Makes sense to pass is as an input in specialArgs.
or (throw '' | ||
To use integrations.pre-commit, you need to add the following to your flake inputs: | ||
|
||
inputs.pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; | ||
''); |
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.
Might be good to refer to devenv.yaml, instead of flakes, as that is the default way people are using devenv. The same is done in the Ruby module:
devenv/src/modules/languages/ruby.nix
Lines 6 to 12 in ecd528f
nixpkgs-ruby = inputs.nixpkgs-ruby or (throw '' | |
To use languages.ruby.version or languages.ruby.versionFile, you need to add the following to your devenv.yaml: | |
inputs: | |
nixpkgs-ruby: | |
url: github:bobvanderlinden/nixpkgs-ruby | |
''); |
The issue with this change is that it will break for all users that won't use We need to provide backwards compatible way to transition (it should just work for devenv 0.5.1 or lower). |
Please take over! |
For anyone that picks this up:
|
e82dccf
to
2cae5ec
Compare
This should be done on top of #745 |
Closing as it's completely out of date, if someone wants to pick it up, please do. |
No description provided.