3 ms·
Would be more like function main(pkgs: Map String Package = (import(sys.path("nixpkgs"))({}))){ } I'm not sure if it's better at this point...
by arianvanp 6y ago
Would be more like
function main(pkgs: Map String Package = (import(sys.path("nixpkgs"))({}))){
}
I'm not sure if it's better at this point...
- xena 6y agoExcept not everything in nixpkgs is a package! It's closer to a standard library that just happens to include a lot of packages.
- danieldk 6y agoIn fact, a derivation is not even a type. AFAIK it is only informally defined as an attribute set with an attribute type with the value derivation: https://github.com/NixOS/nixpkgs/blob/2cd8c35c1fdfdb773df7ec1dbe1aa7e1bc33f13d/lib/attrsets.nix#L305 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.).