buildGoPackage's fetcher don't remove submodules #98848
Labels
0.kind: packaging request
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
6.topic: golang
ref: https://github.com/golang/go/blob/master/src/cmd/vendor/golang.org/x/mod/zip/zip.go#L212
go get
will remove submodules(subdirectories withgo.mod
in it) after fetch repo, but the fetcher inbuildGoPackage
simply usefetchgit
clone the whole repo.This has some potential bad effect, also might be an issue when we want to support different versions of submodules from same repo in tools like vgo2nix.
If we simply add
postFetch
hook tofetchgit
to remove directories in repo, the sha256 would not match, an option would be create a wrapper derivation to copy/link the sources (what's the idiomatic way to do this in nix?).The text was updated successfully, but these errors were encountered: