From 9d5417501b1bdf5f363221a14b2e2a92ef2ba3e2 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 13 Dec 2019 00:12:33 +0000 Subject: [PATCH] docs(README): Update description of buildGo.external --- README.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 489cf1281..e84ede663 100644 --- a/README.md +++ b/README.md @@ -90,19 +90,20 @@ in buildGo.program { | `deps` | `list` | List of dependencies (i.e. other Go libraries) | 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 - is possible to write `buildGo.package` specifications for each subpackage of - an external dependency, but it is often cumbersome to do so. + This function performs analysis on the supplied source code (which + can use the standard Go tooling layout) and creates a tree of all + the packages contained within. - | parameter | type | use | required? | - |-----------|----------------|------------------------------------------------|-----------| - | `path` | `string` | Go import path for the resulting library | yes | - | `src` | `path` | Path to the source **directory** | yes | - | `deps` | `list` | List of dependencies (i.e. other Go libraries) | no | - | `srcOnly` | `bool` | Only copy sources, do not perform a build. | no | - | `targets` | `list` | Sub-packages to build (defaults to all) | no | + This exists for compatibility with external libraries that were not + defined using buildGo. + + | parameter | type | use | required? | + |-----------|----------------|-----------------------------------------------|-----------| + | `path` | `string` | Go import path for the resulting package | yes | + | `src` | `path` | Path to the source **directory** | yes | + | `deps` | `list` | List of dependencies (i.e. other Go packages) | no | For some examples of how `buildGo.external` is used, check out [`proto.nix`](./proto.nix).