about summary refs log tree commit diff
path: root/nixpkgs/doc/languages-frameworks/go.section.md
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/doc/languages-frameworks/go.section.md')
-rw-r--r--nixpkgs/doc/languages-frameworks/go.section.md26
1 files changed, 16 insertions, 10 deletions
diff --git a/nixpkgs/doc/languages-frameworks/go.section.md b/nixpkgs/doc/languages-frameworks/go.section.md
index b20a8d0c3549..45d85f1f99ec 100644
--- a/nixpkgs/doc/languages-frameworks/go.section.md
+++ b/nixpkgs/doc/languages-frameworks/go.section.md
@@ -13,6 +13,7 @@ In the following is an example expression using `buildGoModule`, the following a
 
 - `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;`
 - `runVend`: runs the vend command to generate 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.
+- `proxyVendor`: Fetches (go mod download) and proxies the vendor directory. This is useful if any dependency has case-insensitive conflicts which will produce platform dependant `vendorSha256` checksums.
 
 ```nix
 pet = buildGoModule rec {
@@ -112,16 +113,6 @@ done
 
 Both `buildGoModule` and `buildGoPackage` can be tweaked to behave slightly differently, if the following attributes are used:
 
-### `buildFlagsArray` and `buildFlags`: {#ex-goBuildFlags-noarray}
-
-These attributes set build flags supported by `go build`. We recommend using `buildFlagsArray`.
-
-```nix
-  buildFlagsArray = [
-    "-tags=release"
-  ];
-```
-
 ### `ldflags` {#var-go-ldflags}
 
 Arguments to pass to the Go linker tool via the `-ldflags` argument of `go build`. The most common use case for this argument is to make the resulting executable aware of its own version. For example:
@@ -134,6 +125,21 @@ Arguments to pass to the Go linker tool via the `-ldflags` argument of `go build
   ];
 ```
 
+### `tags` {#var-go-tags}
+
+Arguments to pass to the Go via the `-tags` argument of `go build`. For example:
+
+```nix
+  tags = [
+    "production"
+    "sqlite"
+  ];
+```
+
+```nix
+  tags = [ "production" ] ++ lib.optionals withSqlite [ "sqlite" ];
+```
+
 ### `deleteVendor` {#var-go-deleteVendor}
 
 Removes the pre-existing vendor directory. This should only be used if the dependencies included in the vendor folder are broken or incomplete.