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
buildGoModule: correct spelling in documentation and simplify the go-modules structure #234032
Conversation
Switching to draft as we'll merge #225371 first. |
@ShamrockLee Please rebase this PR. |
Change "platform dependant" to "platform-dependent" The word "dependant" (with suffix -ant) is used as a noun in British English, while the adjetive is "dependent" (-ent). Both are "dependent" in American English. Reference: https://www.merriam-webster.com/words-at-play/spelling-variants-dependent-vs-dependant https://dictionary.cambridge.org/dictionary/english/dependant
2270c8f
to
a70fd4a
Compare
pkgs/build-support/go/module.nix
Outdated
|
||
assert goPackagePath != "" -> throw "`goPackagePath` is not needed with `buildGoModule`"; | ||
assert (args' ? vendorHash && args' ? vendorSha256) -> throw "both `vendorHash` and `vendorSha256` set. only one can be set."; | ||
|
||
let | ||
args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" "vendorHash" ]; | ||
|
||
go-modules = if (vendorHash != null) then stdenv.mkDerivation (let modArgs = { | ||
go-modules = if (isNull vendorHash) then "" else |
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.
https://nixos.org/manual/nix/stable/language/builtins.html#builtins-isNull
This function is deprecated; just write e == null instead.
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.
Addressed.
a70fd4a
to
bed1593
Compare
Please revert the last indentation change. |
bed1593
to
3bf1e14
Compare
pkgs/build-support/go/module.nix
Outdated
go-modules = | ||
if (isNull vendorHash) then "" else |
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.
Sorry, in my previous comment I meant revert this:
go-modules = | |
if (isNull vendorHash) then "" else | |
go-modules = if (isNull vendorHash) then "" else |
3bf1e14
to
98689de
Compare
@ShamrockLee Please drop the formatting changes from this PR, rather than us going back and forth over formatting it'll be easier if I do it myself. |
98689de
to
6634a21
Compare
Finished rebasing and addressed the suggestions. |
Description of changes
Change "platform dependant checksums" to "platform-dependent checksums", as "dependant" is only used as a noun.
Simplify the attribute structure in
pkgs/build-support/go/modules.nix
. This causes no rebuild and ease the review process of #225051.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)