diff options
author | ajs124 <git@ajs124.de> | 2022-07-29 00:46:48 +0200 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2022-08-02 07:28:13 +1000 |
commit | 0d5c464ad611c9d7b8ba20717591ad435404ebcf (patch) | |
tree | 4281214403e1956a10d5f868dad990dd9a340975 /doc/languages-frameworks/go.section.md | |
parent | 6f435e54b5fa853027d01f11d88b0c4102970eaf (diff) |
buildGoModule: add vendorHash
the _unset hack is kind of ugly, but it needs to default to something and it can't be null, because that already has special meaning
Diffstat (limited to 'doc/languages-frameworks/go.section.md')
-rw-r--r-- | doc/languages-frameworks/go.section.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/languages-frameworks/go.section.md b/doc/languages-frameworks/go.section.md index 9c67a514335ed..8616d64e7c4e0 100644 --- a/doc/languages-frameworks/go.section.md +++ b/doc/languages-frameworks/go.section.md @@ -11,8 +11,8 @@ The function `buildGoModule` builds Go programs managed with Go modules. It buil In the following is an example expression using `buildGoModule`, the following arguments are of special significance to the function: -- `vendorSha256`: is the hash of the output of the intermediate fetcher derivation. `vendorSha256` can also take `null` as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set `vendorSha256 = null;` -- `proxyVendor`: Fetches (go mod download) and proxies the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build or if any dependency has case-insensitive conflicts which will produce platform dependant `vendorSha256` checksums. +- `vendorHash`: is the hash of the output of the intermediate fetcher derivation. `vendorHash` can also take `null` as an input. When `null` is used as a value, rather than fetching the dependencies and vendoring them, we use the vendoring included within the source repo. If you'd like to not have to update this field on dependency changes, run `go mod vendor` in your source repo and set `vendorHash = null;` +- `proxyVendor`: Fetches (go mod download) and proxies the vendor directory. This is useful if your code depends on c code and go mod tidy does not include the needed sources to build or if any dependency has case-insensitive conflicts which will produce platform dependant `vendorHash` checksums. ```nix pet = buildGoModule rec { @@ -26,7 +26,7 @@ pet = buildGoModule rec { sha256 = "0m2fzpqxk7hrbxsgqplkg7h2p7gv6s1miymv3gvw0cz039skag0s"; }; - vendorSha256 = "1879j77k96684wi554rkjxydrj8g3hpp0kvxz03sd8dmwr3lh83j"; + vendorHash = "sha256-ciBIR+a1oaYH+H1PcC8cD8ncfJczk1IiJ8iYNM+R6aA="; meta = with lib; { description = "Simple command-line snippet manager, written in Go"; |