First off let me say sorry if this is the wrong way to ask for help or if I’m breaking some rule. I’m not familiar with doing something like this since I’m more of a lurker than anything else.
I’ve been trying to find out how to install a fork of the lf file manager from this link:
I’ve also tried reading some of the other posts on this page talking about how to install Go programs but no matter what I can’t figure it out. This is what I have so far:
I’ve tried many different combinations of stuff in the “rev”, “sha256” and “vendorHash” fields. How do I get the hashes I need? Am I going about this the wrong way?
When in doubt, replace any hashes you don’t know with lib.fakeHash and nix will scream the correct values at you (caveat someome performing an MITM attack or cosmic rays).
You can also use the various nix-prefetch variants, not sure if one exists that supports go vendor directories.
You can only reliably leave vendorHash as null if the repository you are building has a vendor directory. As for the other hashes, you can leave them blank (or set to lib.fakeSHA256) and let the nix build cli error and give you the correct values, it will give you something like
Awesome thanks that worked perfectly. Just one question, the nix cli will give me the correct sha256 but how do I get the vendorHash when there is no vendor directory?
If you leave them both blank, it can be trickier to know which hash they are telling you about. But the error message will tell you which derivation it encountered the error on. It’ll be a path to the nix store, and it looks like it will end in -source.drv if its the src.sha256, and end in -go-modules.drv if its the vendorHash. Hope that helps.