This is an issue with the nixpkgs/lib/systems/{inspect,parse}.nix files, which mutually include themselves, and use nested with expressions, which makes static analysis about which free variables belong to which scope mostly impossible.
{ lib }:
with import ./parse.nix { inherit lib; };
with lib.attrsets;
with lib.lists;
{ lib }:
with lib.lists;
with lib.types;
with lib.attrsets;
with lib.strings;
with (import ./inspect.nix { inherit lib; }).predicates;
This is an issue with the
nixpkgs/lib/systems/{inspect,parse}.nixfiles, which mutually include themselves, and use nestedwithexpressions, which makes static analysis about which free variables belong to which scope mostly impossible.see also https://gist.github.com/zseri/bb8ed4f47123960f4231d6fa928599ac for the current transpilation result.
RFC to maybe fix this: [RFC 0120] Discourage nested
withexpressions NixOS/rfcs#120