-
Notifications
You must be signed in to change notification settings - Fork 8
Prototype of tests #9
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
aciceri
left a comment
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 haven't tried it anyway. Does it already work?
checks/testing.nix
Outdated
| pkgs = import inputs.nixpkgs { | ||
| inherit system; | ||
| overlays = [ | ||
| ]; | ||
| }; |
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.
You can override _module.args.pkgs. IMO it's a bit cleaner than using let.
checks/testing.nix
Outdated
| checks = mkOption { | ||
| type = types.attrsOf types.package; | ||
| default = {}; | ||
| internal = true; | ||
| }; |
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.
Do we need this? Can't we directly assigned to flake.checks?
| type = types.lazyAttrsOf (types.submodule { | ||
| options = { | ||
| systems = mkOption { | ||
| type = types.listOf types.str; |
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.
If you want to create a cleaner type consider using lib.systems.flakeExposed which gives you a list of all systems used in nixpkgs.
lib/default.nix
Outdated
| options.cardanoNix = lib.mkOption { | ||
| type = lib.types.lazyAttrsOf lib.types.submodule; | ||
| }; |
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.
Is this needed? Can't we simply declare options.cardanoNix.<thing>?
| module = mkOption { | ||
| type = types.defferedModule; | ||
| }; | ||
| }; |
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.
This lacks a name option that by default is equal to config._module.args.name.
|
@avnik is there any reason why it's marked as draft or it's ready? |
No description provided.