Open PkmX opened 4 years ago
No, they shouldn't be documented because they're internal. But <nix/fetchurl.nix>
should be documented though.
Sounds good for me, since that is supposed to be the user-facing API.
Duplicate of #1489 then
It's not really a duplicate of #1489, which is about the builtins.fetchurl
function. This is about the function from <nix/fetchurl.nix>
which is a derivation that calls a builtin builder.
I marked this as stale due to inactivity. → More info
Still relevant.
I marked this as stale due to inactivity. → More info
Can we make the builtin builders user-facing? We actually used <nix/fetchurl.nix>
and corepkgs
in production because they really help solving bootstrapping problems. corepkgs
(and builtins:fetchurl
and builtins:unpack-channel
) were very helpful bootstrapping a nixpkgs from.
Especially in airgapped situations this can be extremely helpful since the fetchers do not (yet) try substitutes.
:+1: on documenting <nix/fetchurl.nix>
/ builtins:fetchurl
, but builtins:unpack-channel
is too nix-channel
-specific to document. Ideally we would remove it in the future (nix profile
doesn't use it anymore IIRC).
sweet! My only nit with that is that builtin:unpack-channel
is close enough to a general unpacker that it is very close to a general-purpose builtin:unpack
that is also very useful during bootstrap.
The builder of a derivation accepts a few builtin builders as described here:
https://github.com/NixOS/nix/blob/512753f8247b927b62fd9391ee5ba6dda29ea4d4/src/libstore/build.cc#L3497
These should be documented somewhere and how they differ from some builtin functions. From my understanding
builtins.fetchurl
fetches during instantiation time but a derivation usingbuiltins:fetchurl
asbuilder
downloads when actually realizing the derivation.