nixpkgs-manual: fix build

This commit is contained in:
Philip Taron 2024-08-20 06:49:36 -07:00
parent bbbd473f8d
commit 198af78cb6
No known key found for this signature in database

View File

@ -91,7 +91,7 @@ To obtain the hash without external tools, set `vendorHash = lib.fakeHash;` and
}
```
### Overriding `goModules` (#buildGoModule-goModules-override)
### Overriding `goModules` {#buildGoModule-goModules-override}
Overriding `<pkg>.goModules` by calling `goModules.overrideAttrs` is unsupported. Still, it is possible to override the `vendorHash` (`goModules`'s `outputHash`) and the `pre`/`post` hooks for both the build and patch phases of the primary and `goModules` derivation. Alternatively, the primary derivation provides an overridable `passthru.overrideModAttrs` function to store the attribute overlay implicitly taken by `goModules.overrideAttrs`. Here's an example usage of `overrideModAttrs`: