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

fetchTarball needs a sha256 #42

Open
palfrey opened this issue May 12, 2024 · 1 comment
Open

fetchTarball needs a sha256 #42

palfrey opened this issue May 12, 2024 · 1 comment

Comments

@palfrey
Copy link

palfrey commented May 12, 2024

Tried adding a fetchTarball variant to my config (mostly to avoid a really long git clone), and got error: in pure evaluation mode, 'fetchTarball' requires a 'sha256' argument

@lazamar
Copy link
Owner

lazamar commented May 12, 2024

Ok, so it looks like that's really needed in pure mode.

If you are just installing stuff locally, apparently you can use the --impure flag to get rid of the error.

But it might be nice to provide a sha256 of the tarball so that the install command can work in pure mode.

Right now we tell nix to fetch this tarball and use it at indexing time.

command destination =
"nix-env -qaP --json -f "
<> GitHub.archiveUrl nixpkgsRepo commit
<> " --arg config '" <> config <> "'"
<> " >" <> destination

We could instead download the tarball during indexing and tell Nix to use the downloaded result, this way we could also get the sha256 of the file along the way.

Tell me if using --impure would work for your use case.

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

No branches or pull requests

2 participants