New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wtf: No longer use vendored dependencies #68189
Conversation
The go modules utilized by the project and the vendored dependencies already diverged, so the nix build of `wtf` was slightly out-of-date regarding the official binary. The gocenter proxy provides "immutable re-usable Go modules" which should avoid the problem of any dependency suddenly vanishing.
Also, the wtf project renamed the binary from |
How will it work with the proxy and building in a sandbox? |
@@ -9,28 +9,23 @@ buildGoModule rec { | |||
pname = "wtf"; | |||
version = "0.21.0"; | |||
|
|||
overrideModAttrs = _oldAttrs : _oldAttrs // { | |||
preBuild = ''export GOPROXY="https://gocenter.io"''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have this for all packages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure, but I am also a bit out of my element here; not really using Go and not knowing its best practices.
At least, this is what the wtf project's build instructions advice. And the "immutable re-usable Go modules" part sounds quite interesting. But, I also hear that with newer Go versions, there will be an official proxy / modules server... ?!
Network access is allowed in fixed-input derivations, which is what we use to fetch go packages. |
Renaming it in |
Motivation for this change
The project once could not be build because a dependency disappeared.(see here: wtfutil/wtf#501)
That's why the project's maintainer included vendored dependencies right in the upstream project. Those dependencies are apparently not updated alongside the main go.mod dependencies.
The go modules utilized by the project and the vendored dependencies already
diverged, so the nix build of
wtf
was slightly out-of-date regarding theofficial binary.
The gocenter proxy provides "immutable re-usable Go modules" which should avoid the problem of any dependency suddenly vanishing.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @marsam @kalbasit