| I guess this is kinda expected given how nix-build works, but still. I don't like this. And better yet:
# foo.nix
{
__functor = _: {
foo = "hi from inside";
};
}
# bar.nix
{
__functor = _: {}: {
foo = "hi from inside";
};
}
# baz.nix
{
__functor = _: _: {
foo = "hi from inside";
};
}
$ nix-instantiate --eval foo.nix -A foo
"hi from inside"
$ nix-instantiate --eval bar.nix -A foo
"hi from inside"
$ nix-instantiate --eval baz.nix -A foo
error: the value being indexed in the selection path 'foo' at '' should be a set but is a function: «lambda __functor @ baz.nix:2:18»
|