Nix, is a dynamically typed language, i.e. the language gives every value at runtime a type, but there a no compile-time (i.e. static) checks whether any function or operator calls will match at runtime to their parameters. Programs can be translated from dynamically typed-languages to statically typed languages. Either by infering types at translation time or by exhaustively adding lots of cases to every function or operator call depending on the runtime. The first approach can in principle only translate a subset of all programs, the latter does not give you any additional guarantees, because you have encoded an interpreter for the dynamically-type language into the statically typed language.
Whether the first approach could be used on a large codebase like nixpkgs is highly questionable, the second approach would not yield any advantages here.
That's what I said in more words. I didn't mention the case of encoding the source language in the target because it should be obvious that this is, from the perspective of the translator, the trivial, and as you mention, useless, solution.