-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Make mkVendorEnv
generate modules.txt
#117
Comments
doronbehar
changed the title
Make
Make Apr 12, 2023
mkVendorEnv
generate `modules.txtmkVendorEnv
generate modules.txt
However, I see that |
Note: |
obreitwi
added a commit
to obreitwi/gomod2nix
that referenced
this issue
Sep 1, 2024
Fixes: nix-community#117 Since go 1.23, `vendor/modules.txt` is [required](golang/go@38ee0c7#diff-61fb6e44eac25bd4d6a8a64b3f38ee8a41faaefd1ef481170a011ecfc0f7c76bR344). Hence, this is a first attempt to track `modules.txt` via gomod2nix. Since, unfortunately, `module.txt` employs a bespoke custom format in which [varying](https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/cmd/go/internal/modload/vendor.go;l=57) [numbers](https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/cmd/go/internal/modload/vendor.go;l=103) of `#` hold meaning I deemed it more stable to not reverse engineer it. Instead, we generate it when running `gomod2nix` by executing `go mod vendor` and tracking its content in `gomod2nix.toml`. Not the most elegant solution, but it works and enables us to use gomod2nix with go v1.23. Any comments appreached…
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So to my understanding, this package emulates
go mod vendor
. However, in order to use thevendor
directory withbuildGoModule
(see #116), themodules.txt
file is required:The text was updated successfully, but these errors were encountered: