gomod2nix icon indicating copy to clipboard operation
gomod2nix copied to clipboard

Add preliminary support for private dependencies using builtins.fetchGit

Open adisbladis opened this issue 2 years ago • 4 comments

Add preliminary support for private dependencies using builtins.fetchGit

Using this API looks like:

buildGoApplication {
  srcOverrides = self: super: {
    "github.com/BurntSushi/toml" = super."github.com/BurntSushi/toml".override { private = true; };
  };
}

Outstanding issues:

  • Nix has issues dealing with short revs ( https://github.com/NixOS/nix/issues/4694 )
  • Param passing heuristics to fetchGit needs to be nailed down.

adisbladis avatar May 29 '22 11:05 adisbladis

Nice!

Think you might be able to incorporate some of https://github.com/tweag/gomod2nix/pull/11 to resolve the full git rev/SHA?

cstrahan avatar Jun 14 '22 20:06 cstrahan

I have started looking at adding short rev support to Nix so we don't have to add any more metadata.

adisbladis avatar Jun 14 '22 20:06 adisbladis

Is this patch waiting for upstream changes? Is there any other work that needs doing to support private repos other than what is outlined in this PR?

jgresty avatar Sep 21 '22 02:09 jgresty

Hi, just bumping this up to see if there is any reply to the previous comment questions :)

pho avatar Mar 07 '23 10:03 pho