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

take some inspiration from NixOS for different fetchers, mirrors, and so on. #82

Open
armijnhemel opened this issue Oct 11, 2022 · 0 comments

Comments

@armijnhemel
Copy link
Contributor

NixOS has quite a few fetchers for different VCS systems as well as mirrored sites:

https://github.com/NixOS/nixpkgs/tree/master/pkgs/build-support

It might be worthwhile to spend some time understanding what they are doing there and get some inspiration. Some systems, such as GitHub, apparently do not return hashes in a consistent way per release, but it differs, so hashes that are used by NixOS are computed in a different way.

The NixOS fetchers have support for downloading from mirrors (example: sourceforge) and have supporting syntax in the Nix files for it, for example:

url = "mirror://sourceforge/scummvm/lure-${version}.zip";

which would automatically grab a mirror from the list of defined mirrors.

There are also some fetchers that are a bit more obscure bit which might be fun or useful to add.

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

1 participant