Re:Nixery – Docker images on the fly with Nix
by codingkoi on Tuesday April 19, 2022 @12:17PM
(#31085215)
Once I discovered `lib.fakeSha256`, I just put that in the derivation, try to build it and then use the error message to find the correct hash to put into it. Probably not the fastest way to do it, but it's easier for me to remember.
Re:Nixery – Docker images on the fly with Nix
by JamesSwift on Tuesday April 19, 2022 @12:18PM
(#31085219)
yeah that seems way easier, thanks for the tip!
Here is a more involved example of downloading a release and then extracting the binary from a .pkg file: https://gist.github.com/J-Swift/364a8b158bf0b603f6e784e454ca...
Here is a more simplified example: https://gist.github.com/mitchellh/c47e3333bb78f57836ba2aa806...
EDIT: to get the sha, unfortunately you have to perform some esoteric command line incantations: https://github.com/NixOS/nix/issues/1880#issuecomment-366615... and https://gist.github.com/boxofrox/d8a3080fbb03f84b7d7a31e102b...