Without the change the eval fails as:
$ nix eval --impure --expr 'with import ./. { system = "x86_64-linux"; }; darwin.moltenvk.NIX_CFLAGS_COMPILE'
error:
… in the condition of the assert statement
at pkgs/stdenv/generic/make-derivation.nix:716:11:
715| n: v:
716| assert assertMsg (isString v || isBool v || isInt v || isDerivation v)
| ^
717| "The `env` attribute set can only contain derivation, string, boolean or integer attributes. The `${n}` attribute is of type ${builtins.typeOf v}.";
… in the left operand of the OR (||) operator
at lib/asserts.nix:39:31:
38| # TODO(Profpatsch): add tests that check stderr
39| assertMsg = pred: msg: pred || builtins.throw msg;
| ^
40|
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: expected a set but found null: null