mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2025-03-13 20:28:41 +00:00
legacyPackages: anything -> raw
The `anything` type is too strict, because it uses `attrsOf` internally, filtering out `mkIf` attrs and therefore evaluating attribute values when only the names would be needed. Furthermore, it is not safe to make assumptions about the objects in legacyPackages, because while most attributes contain packages or package sets, anything is allowed, so we don't know for sure how to merge. Fixes #52
This commit is contained in:
parent
608ed35022
commit
d254845ca8
1 changed files with 4 additions and 4 deletions
|
@ -16,10 +16,10 @@ in
|
|||
options = {
|
||||
flake = mkSubmoduleOptions {
|
||||
legacyPackages = mkOption {
|
||||
type = types.lazyAttrsOf (types.lazyAttrsOf types.anything);
|
||||
type = types.lazyAttrsOf (types.lazyAttrsOf types.raw);
|
||||
default = { };
|
||||
description = ''
|
||||
Per system, an attribute set of anything. This is also used by <literal>nix build .#<attrpath></literal>.
|
||||
Per system, an attribute set of unmergeable values. This is also used by <literal>nix build .#<attrpath></literal>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -27,10 +27,10 @@ in
|
|||
perSystem = mkPerSystemOption ({ config, ... }: {
|
||||
options = {
|
||||
legacyPackages = mkOption {
|
||||
type = types.lazyAttrsOf types.anything;
|
||||
type = types.lazyAttrsOf types.raw;
|
||||
default = { };
|
||||
description = ''
|
||||
An attribute set of anything. This is also used by <literal>nix build .#<attrpath></literal>.
|
||||
An attribute set of unmergeable values. This is also used by <literal>nix build .#<attrpath></literal>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue