fix: avoid eval error by discouraging overzealus module signatures#416
fix: avoid eval error by discouraging overzealus module signatures#416blaggacao wants to merge 1 commit intocachix:mainfrom
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.sThe 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? |
bobvanderlinden
left a comment
There was a problem hiding this comment.
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.
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
|
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.