Merge pull request #267 from hercules-ci/better-output-merge-error

Add custom merge error for unknown flake output attrs
This commit is contained in:
Robert Hensing 2025-01-06 06:57:10 +01:00 committed by GitHub
commit b905f6fc23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,7 +10,23 @@ in
flake = mkOption {
type = types.submoduleWith {
modules = [
{ freeformType = types.lazyAttrsOf types.raw; }
{
freeformType =
types.lazyAttrsOf
(types.unique
{
message = ''
No option has been declared for this flake output attribute, so its definitions can't be merged automatically.
Possible solutions:
- Load a module that defines this flake output attribute
Many modules are listed at https://flake.parts
- Declare an option for this flake output attribute
- Make sure the output attribute is spelled correctly
- Define the value only once, with a single definition in a single module
'';
}
types.raw);
}
];
};
description = ''