···20202121 To obtain the actual hash, set `vendorHash = lib.fakeSha256;` and run the build ([more details here](#sec-source-hashes)).
2222- `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.
2323+- `modPostBuild`: Shell commands to run after the build of the go-modules executes `go mod vendor`, and before calculating fixed output derivation's `vendorHash` (or `vendorSha256`). Note that if you change this attribute, you need to update `vendorHash` (or `vendorSha256`) attribute.
23242425```nix
2526pet = buildGoModule rec {
···114115115116## Attributes used by the builders {#ssec-go-common-attributes}
116117117117-Both `buildGoModule` and `buildGoPackage` can be tweaked to behave slightly differently, if the following attributes are used:
118118+Many attributes [controlling the build phase](#variables-controlling-the-build-phase) are respected by both `buildGoModule` and `buildGoPackage`. Note that `buildGoModule` reads the following attributes also when building the `vendor/` go-modules fixed output derivation as well:
119119+120120+- [`sourceRoot`](#var-stdenv-sourceRoot)
121121+- [`prePatch`](#var-stdenv-prePatch)
122122+- [`patches`](#var-stdenv-patches)
123123+- [`patchFlags`](#var-stdenv-patchFlags)
124124+- [`postPatch`](#var-stdenv-postPatch)
125125+- [`preBuild`](#var-stdenv-preBuild)
126126+127127+In addition to the above attributes, and the many more variables respected also by `stdenv.mkDerivation`, both `buildGoModule` and `buildGoPackage` respect Go-specific attributes that tweak them to behave slightly differently:
118128119129### `ldflags` {#var-go-ldflags}
120130
···8383 inherit (args) src;
8484 inherit (go) GOOS GOARCH;
85858686+ # The following inheritence behavior is not trivial to expect, and some may
8787+ # argue it's not ideal. Changing it may break vendor hashes in Nixpkgs and
8888+ # out in the wild. In anycase, it's documented in:
8989+ # doc/languages-frameworks/go.section.md
8690 prePatch = args.prePatch or "";
8791 patches = args.patches or [];
8892 patchFlags = args.patchFlags or [];
8993 postPatch = args.postPatch or "";
9094 preBuild = args.preBuild or "";
9191- postBuild = args.postBuild or "";
9595+ postBuild = args.modPostBuild or "";
9296 sourceRoot = args.sourceRoot or "";
93979498 GO111MODULE = "on";
···11{ lib, fetchFromGitHub, rustPlatform }:
22rustPlatform.buildRustPackage rec {
33 pname = "tagref";
44- version = "1.6.0";
44+ version = "1.7.0";
5566 src = fetchFromGitHub {
77 owner = "stepchowfun";
88 repo = pname;
99 rev = "v${version}";
1010- sha256 = "sha256-tAkRTHstXoGrSDX5h7xOpHHDOdCqdYu3AXoda84ha4g=";
1010+ sha256 = "sha256-ESImTR3CFe6ABCP7JHU7XQYvc2VsDN03lkVaKK9MUEU=";
1111 };
12121313- cargoHash = "sha256-3pD4hocvnfQziGtDvgc4QxnCEHlmsCFK32PI1zEh9z0=";
1313+ cargoHash = "sha256-vqRVD5RW0j2bMF/Zl+Ldc06zyDlzRpADWqxtkvKtydE=";
14141515 meta = with lib; {
1616 description = "Tagref helps you refer to other locations in your codebase.";
+2-2
pkgs/tools/package-management/nix/default.nix
···6969 patches = (args.patches or [ ]) ++ [ ./patches/aws-sdk-cpp-TransferManager-ContentEncoding.patch ];
70707171 # only a stripped down version is build which takes a lot less resources to build
7272- requiredSystemFeatures = null;
7272+ requiredSystemFeatures = [ ];
7373 });
74747575 aws-sdk-cpp-nix = (aws-sdk-cpp.override {
···7777 customMemoryManagement = false;
7878 }).overrideAttrs (args: {
7979 # only a stripped down version is build which takes a lot less resources to build
8080- requiredSystemFeatures = null;
8080+ requiredSystemFeatures = [ ];
8181 });
82828383