Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How to manually replicate/reproduce/obtain the sha256 hash specified in Nix with fetchgit or fetchFromGitHub? #1880
At https://nixos.org/nixpkgs/manual/ we see this example:
How do I obtain these hashes myself? I tried the commands
but as you can see, both hashes are completely different from any of the above two.
So how do I actually replicate/reproduce/obtain the sha256 hash specified in Nix with fetchgit or fetchFromGitHub?
Your command is not matching the stuff in fetchFromGitHub. Here is a real example (as opposed to example hardcoded in docs): https://github.com/NixOS/nixpkgs/blob/a78a1d61b56405aeaf04c173e4e3eebbc7cc52b8/pkgs/applications/altcoins/bitcoin-unlimited.nix
If we look into https://github.com/bitcoinunlimited/bitcoinunlimited, we see that the tag
If we try your command:
That's a totally different hash than that in the
You found another bad expression :-D