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

Allow any hash function for some git-based fetch* derivations #15139

Merged

Conversation

aneeshusa
Copy link
Contributor

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • OS X
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

This didn't cause a mass-rebuild for me. I also tested using sha512 in the tmux derivation which uses fetchFromGitHub, which worked fine.

@groxxda
Copy link
Contributor

groxxda commented May 2, 2016

Is it possible to use overrideDerivation (like fetchzip utilizes fetchurl) and thus support any hash that's supported by the underlying fetchurl?

Instead of hard-coding which hash types are available, merge the input
arg set into the fetchzip arguments to enable passing any hash type
that the underyling fetchurl (underneath fetchzip, which does the same
thing) supports for hash agility.

Also, provide rev attributes on all of these derivations,
not just fetchFromGitHub.
@aneeshusa aneeshusa force-pushed the allow-sha512-for-various-fetch-derivations branch from 57f7821 to 208f1fb Compare May 2, 2016 17:11
@aneeshusa
Copy link
Contributor Author

@groxxda That's a good suggestion! I didn't need to use overrideDerivation, but just merged in the input args to the fetchzip args.

I also gave all 5 of these derivations the rev attribute, to standardize it a bit.

@aneeshusa aneeshusa changed the title Allow sha512 for some git-based fetch* derivations Allow any hash function for some git-based fetch* derivations May 2, 2016
@joachifm joachifm merged commit 85b3613 into NixOS:master May 5, 2016
@jtojnar jtojnar mentioned this pull request Nov 17, 2018
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants