function main(pkgs: Map String Package = (import(sys.path("nixpkgs"))({}))){ }
I'm not sure if it's better at this point...
https://github.com/NixOS/nixpkgs/blob/2cd8c35c1fdfdb773df7ec...
I am pretty sure that instantiating a derivation probably requires more attributes. But in the end they are just attribute sets (which is one of the types in Nix besides strings, lists, etc.).
function main(pkgs: Map String Package = (import(sys.path("nixpkgs"))({}))){ }
I'm not sure if it's better at this point...