docs(README): Update description of buildGo.external

This commit is contained in:
Vincent Ambo 2019-12-13 00:12:33 +00:00 committed by Vincent Ambo
parent 369c86e0ef
commit 9d5417501b

View file

@ -90,19 +90,20 @@ in buildGo.program {
| `deps` | `list<drv>` | List of dependencies (i.e. other Go libraries) | no | | `deps` | `list<drv>` | List of dependencies (i.e. other Go libraries) | no |
| `path` | `string` | Go import path for the resulting library | no | | `path` | `string` | Go import path for the resulting library | no |
* `buildGo.external`: Build a Go library or program using standard `go` tooling. * `buildGo.external`: Build an externally defined Go library or program.
This exists for compatibility with complex external dependencies. In theory it This function performs analysis on the supplied source code (which
is possible to write `buildGo.package` specifications for each subpackage of can use the standard Go tooling layout) and creates a tree of all
an external dependency, but it is often cumbersome to do so. the packages contained within.
| parameter | type | use | required? | This exists for compatibility with external libraries that were not
|-----------|----------------|------------------------------------------------|-----------| defined using buildGo.
| `path` | `string` | Go import path for the resulting library | yes |
| `src` | `path` | Path to the source **directory** | yes | | parameter | type | use | required? |
| `deps` | `list<drv>` | List of dependencies (i.e. other Go libraries) | no | |-----------|----------------|-----------------------------------------------|-----------|
| `srcOnly` | `bool` | Only copy sources, do not perform a build. | no | | `path` | `string` | Go import path for the resulting package | yes |
| `targets` | `list<string>` | Sub-packages to build (defaults to all) | no | | `src` | `path` | Path to the source **directory** | yes |
| `deps` | `list<drv>` | List of dependencies (i.e. other Go packages) | no |
For some examples of how `buildGo.external` is used, check out For some examples of how `buildGo.external` is used, check out
[`proto.nix`](./proto.nix). [`proto.nix`](./proto.nix).