diff options
author | David Arnold <dgx.arnold@gmail.com> | 2021-07-28 07:54:00 -0500 |
---|---|---|
committer | David Arnold <dgx.arnold@gmail.com> | 2021-08-01 14:56:13 -0500 |
commit | ecae25c3ef137d972e909eb0e85960d90481789e (patch) | |
tree | a8115be83de6a326960d71b10c2c587954229d36 /pkgs/os-specific/linux | |
parent | 863a26e3809df2ecffc63c45831c82b33b05317e (diff) | |
download | nixpkgs-ecae25c3ef137d972e909eb0e85960d90481789e.tar nixpkgs-ecae25c3ef137d972e909eb0e85960d90481789e.tar.gz nixpkgs-ecae25c3ef137d972e909eb0e85960d90481789e.tar.bz2 nixpkgs-ecae25c3ef137d972e909eb0e85960d90481789e.tar.lz nixpkgs-ecae25c3ef137d972e909eb0e85960d90481789e.tar.xz nixpkgs-ecae25c3ef137d972e909eb0e85960d90481789e.tar.zst nixpkgs-ecae25c3ef137d972e909eb0e85960d90481789e.zip |
nixos/nix-daemon: fix registry flake type
Before this commit, the `flake` option was typed with `types.unspecified`. This type get's merged via [`mergeDefaultOption`](https://github.com/NixOS/nixpkgs/blob/ebb592a04c5282f316d60cd4aba066f6e5d74b65/lib/options.nix#L119-L128), which has a line ```nix else if all isFunction list then x: mergeDefaultOption loc (map (f: f x) list) ``` `lib.isFunction` detects an attrs in the shape of `{__functor = ...}` as a function and hence this line substitutes such attrs with a function (f: f x). If now, a flake input has a `__functor` as it's output, this will coerce the once attrs to a function. This breaks a lot of things later in the stack, for example a later `lib.filterAttrs seive <LAMBDA>` will fail for obious reasons. According to @infinisil, `types.unspecified` is due to deprecation. In the meantime this PR provides a specific fix for the specific problem discovered.
Diffstat (limited to 'pkgs/os-specific/linux')
0 files changed, 0 insertions, 0 deletions