Is it good practice to fetch release for a derivation

I’ve been struggling with a derivation that requires network access at build phase.
But this package actually has a release as a zip on github, if I want to add the derivation to nixpkgs simply using fetchzip to get the src, would it be accepted?

What’s the difference in the release vs the source code? Source code is preferred when possible; if you need to fetch something from a network, use a FOD like fetchFromGitHub, fetchurl, etc.

1 Like

Oh I should clarify that the release is precompiled while downloading external files would be required if build from source with the script provided from the repo. And these external files typically don’t have any url, would need certain cilent to download.

Precompiled binaries are discouraged because it’s harder to build usually and harder to deploy security fixes for dependencies if needed. But if you can’t ges the source build working, then binary builds are accepted, as long as you set meta.sourceProvenance correctly.

2 Likes

Thanks for your help! Just got my first pkg merged to nixpkgs :slight_smile:

1 Like

Congrats on your contribution!