Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document <nix/fetchurl.nix> #3493

Open
PkmX opened this issue Apr 13, 2020 · 10 comments
Open

Document <nix/fetchurl.nix> #3493

PkmX opened this issue Apr 13, 2020 · 10 comments

Comments

@PkmX
Copy link

PkmX commented Apr 13, 2020

The builder of a derivation accepts a few builtin builders as described here:

if (drv->builder == "builtin:fetchurl")

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 using builtins:fetchurl as builder downloads when actually realizing the derivation.

@edolstra
Copy link
Member

No, they shouldn't be documented because they're internal. But <nix/fetchurl.nix> should be documented though.

@PkmX
Copy link
Author

PkmX commented Apr 14, 2020

Sounds good for me, since that is supposed to be the user-facing API.

@domenkozar
Copy link
Member

Duplicate of #1489 then

@PkmX
Copy link
Author

PkmX commented Apr 30, 2020

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.

@domenkozar domenkozar reopened this Apr 30, 2020
@domenkozar domenkozar changed the title Document builtin builders Document builtins.fetchurl Apr 30, 2020
@domenkozar domenkozar changed the title Document builtins.fetchurl Document <nix/fetchurl.nix> Apr 30, 2020
@stale
Copy link

stale bot commented Feb 13, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 13, 2021
@edolstra
Copy link
Member

Still relevant.

@stale stale bot removed the stale label Feb 13, 2021
@stale
Copy link

stale bot commented Aug 13, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Aug 13, 2021
@jsoo1
Copy link

jsoo1 commented Jun 7, 2023

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.

@stale stale bot removed the stale label Jun 7, 2023
@edolstra
Copy link
Member

edolstra commented Jun 8, 2023

👍 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).

@jsoo1
Copy link

jsoo1 commented Jun 8, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants