I’m currently trying to update opensnitch, basing my work off the previous draft PR (#118329) and rebasing/updating sources, but I’m running into trouble with the vendoring.
What I currently have is here on my fork. I obtained
vendorSha256 by running
nix build .#opensnitch with
vendorSha256 = ""; before pasting in the expected hash, but then the second
nix build .#opensnitch gives me
go: inconsistent vendoring in /build/source/daemon: firstname.lastname@example.org: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt email@example.com: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt firstname.lastname@example.org: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod email@example.com: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod To ignore the vendor directory, use -mod=readonly or -mod=mod. To sync the vendor directory, run: go mod vendor
As I’m not a Go developer, I’m not sure how to fix this—vendoring in a fresh clone
$ git clone https://github.com/evilsocket/opensnitch --branch=v1.4.2 --depth=1 $ cd opensnitch; rm .git -rf # remove .git to make as close to Nix as possible $ nix develop path/to/nixpkgs#opensnitch (nix-shell)$ runHook preBuild (nix-shell)$ go mod vendor
gives me the same
vendor/ folder contents as
nix build gave me, so
buildGoModule seems to be vendoring right. Doing a simple
go build after also works fine.
Does anyone have any ideas/suggestions for what I could try next? Thank you!