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

[RFC] fetchFromGitHub for release archives #16513

Closed
groxxda opened this issue Jun 26, 2016 · 4 comments
Closed

[RFC] fetchFromGitHub for release archives #16513

groxxda opened this issue Jun 26, 2016 · 4 comments
Assignees

Comments

@groxxda
Copy link
Contributor

groxxda commented Jun 26, 2016

Issue description

Currently fetchFromGitHub only allows fetching the source archive.
Some programs (mainly those using autoconf) also provide a release archive that includes a prebuilt configure script.

So a packager has to choose to use either

  • fetchFromGitHub and include autoconf / autoreconfHook plus possible some other dependencies
  • fetchurl and specify the github url for the release archive.

It would be nice if we extended fetchFromGitHub to provide a way to download the release archive.

The change should be fairly trivial and backward-compatible, I'm just wondering if I'm missing something and this is already possible or if this would be considered an improvement in which case I'll be happy to make the required changes and submit a PR.

nixpkgs $ ag -A5 'fetch(zip|url)' | grep github.\*/release | wc -l
144
@joachifm
Copy link
Contributor

Are release archives modified/generated by github? If not, I think it makes sense to simply use fetchurl for release archives.

@vcunat
Copy link
Member

vcunat commented Jun 27, 2016

No, those true releases are only changed by hand, I think. It might still make sense, as there's a difference whether the result is already unpacked or not.

@c0bw3b
Copy link
Contributor

c0bw3b commented Oct 23, 2018

Should we keep this open?
I find using fetchurl for stable releases to be clearer and more straightforward. The biggest problem is rather the opposite (some using fetchurl on unstable GH archives)

@c0bw3b c0bw3b self-assigned this Oct 23, 2018
@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 11, 2019

Closing for now.
The current situation is that:

  • fetchurl should be used for stable GH release assets ; fetchzip can also be used is one wants to use its postFetch hook as seen in many fixed-output derivations.
  • fetchFromGitHub or fetchzip should be used on GH archives depending on personal preferences and features (the former allows to fetch git submodules).

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

5 participants