Re:Bingo – The missing package manager for Go binaries (Home...
by chana_masala on Sunday December 26, 2021 @02:45AM
(#29690530)
Can you explain more? I've looked at Nix but haven't extensively used it
[ Parent
| on HN ]
Re:Bingo – The missing package manager for Go binaries (Home...
by siraben on Sunday December 26, 2021 @03:15AM
(#29690656)
I recently packaged fq (written in Go) in Nixpkgs[0] and it was a breeze. You just have to specify the vendor and source hashes (which can be done automatically), and you get reproducibility for free (at least in the build environment.)
Re:Bingo – The missing package manager for Go binaries (Home...
by trulyrandom on Sunday December 26, 2021 @05:25AM
(#29691191)
What is the proper automated way to get vendorSha256? Currently I always set it to lib.fakeSha256 first, then run the build and obtain the hash from the error message.
Re:Bingo – The missing package manager for Go binaries (Home...
by whateveracct on Monday December 27, 2021 @03:19PM
(#29706342)
That's honestly not a bad way to do it.
To speed things up a little, you can evaluate exactly what you need in the REPL to trigger the error. You can even paste the Nix expression with the fake sha in and it'll be quicker than evaluating your entire build.
There's probably a CLI out there that fetches it a la nix-prefetch-url/git/etc