2022-06-14 10:18:04 +00:00
|
|
|
# Gomod2nix Nix API
|
|
|
|
|
|
|
|
## Public functions
|
|
|
|
|
|
|
|
### buildGoApplication
|
2024-08-04 22:12:55 +00:00
|
|
|
|
2022-06-14 10:18:04 +00:00
|
|
|
Arguments:
|
2024-08-04 22:12:55 +00:00
|
|
|
|
|
|
|
- **modules** Path to `gomod2nix.toml` (\_default: `pwd + "/gomod2nix.toml"`).
|
|
|
|
- **src** Path to sources (\_default: `pwd`).
|
|
|
|
- **pwd** Path to working directory (\_default: `null`).
|
2022-06-14 10:18:04 +00:00
|
|
|
- **go** The Go compiler to use (can be omitted).
|
|
|
|
- **subPackages** Only build these specific sub packages.
|
2024-08-04 22:12:55 +00:00
|
|
|
- **allowGoReference** Allow references to the Go compiler in the output closure (\_default: `false`).
|
|
|
|
- **tags** A list of tags to pass the Go compiler during the build (\_default: `[ ]`).
|
|
|
|
- **ldflags** A list of `ldflags` to pass the Go compiler during the build (\_default: `[ ]`).
|
|
|
|
- **nativeBuildInputs** A list of packages to include in the build derivation (\_default: `[ ]`).
|
2022-06-14 10:18:04 +00:00
|
|
|
|
|
|
|
All other arguments are passed verbatim to `stdenv.mkDerivation`.
|
|
|
|
|
|
|
|
### mkGoEnv
|
2024-08-04 22:12:55 +00:00
|
|
|
|
2022-06-14 10:18:04 +00:00
|
|
|
Arguments:
|
2024-08-04 22:12:55 +00:00
|
|
|
|
2022-06-14 10:18:04 +00:00
|
|
|
- **pwd** Path to working directory.
|
2024-08-04 22:12:55 +00:00
|
|
|
- **modules** Path to `gomod2nix.toml` (\_default: `pwd + "/gomod2nix.toml"`).
|
|
|
|
- **toolsGo** Path to `tools.go` (\_default: `pwd + "/tools.go"`).
|
2022-06-14 10:18:04 +00:00
|
|
|
|
|
|
|
All other arguments are passed verbatim to `stdenv.mkDerivation`.
|