-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
doc: add modRoot package option for building Go modules #117975
base: master
Are you sure you want to change the base?
doc: add modRoot package option for building Go modules #117975
Conversation
@@ -26,6 +27,7 @@ pet = buildGoModule rec { | |||
sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s"; | |||
}; | |||
|
|||
modRoot = "."; |
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.
The default is . so we do not need to specify it.
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.
This specific doc example it is "." but it is common to need to override with Go modules so it should be in the documentation.
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.
Maybe we add a special note so people don't have to go into the Nix lambda (which they often won't) to look up how to set this up for typical Go modules (not the most basic pet example here)? This is a very basic example that doesn't represent a lot of Go modules in the wild.
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.
This specific doc example it is "." but it is common to need to override with Go modules so it should be in the documentation.
Maybe we find a better example where it isn't the default value?
Maybe we add a special note so people don't have to go into the Nix lambda
What do you mean exactly?
I marked this as stale due to inactivity. → More info |
Motivation for this change
Update nixpkgs language packaging documentation referencing and explaining what
modRoot
to building Go modules.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)