nixpkgs/nixos
David Arnold ecae25c3ef
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`](ebb592a04c/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.
2021-08-01 14:56:13 -05:00
..
doc Merge branch 'master' into tt-rss-2021-06-21 2021-07-28 21:06:44 -04:00
lib nixos/testing: fix invalid node names detection 2021-07-28 15:37:57 -05:00
maintainers
modules nixos/nix-daemon: fix registry flake type 2021-08-01 14:56:13 -05:00
tests soapui: 5.5.0 -> 5.6.0 (#131307) 2021-08-01 20:11:12 +02:00
COPYING
default.nix
README
release-combined.nix
release-small.nix
release.nix

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
https://nixos.org/nixos and in the manual in doc/manual.