From e3745a9b6fc41676757cfa39ffdf1e2ada171905 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Tue, 14 Jun 2022 18:18:04 +0800 Subject: [PATCH] docs: Add Nix API reference docs --- docs/nix-reference.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/nix-reference.md diff --git a/docs/nix-reference.md b/docs/nix-reference.md new file mode 100644 index 0000000..bb4317f --- /dev/null +++ b/docs/nix-reference.md @@ -0,0 +1,20 @@ +# Gomod2nix Nix API + +## Public functions + +### buildGoApplication +Arguments: +- **modules** Path to gomod2nix.toml (_default: `pwd + "/gomod2nix.toml"`). +- **src** Path to sources (_default: `pwd`). +- **pwd** Path to working directory (_default: `null`). +- **go** The Go compiler to use (can be omitted). +- **subPackages** Only build these specific sub packages. +- **allowGoReference** Allow references to the Go compiler in the output closure (_default: `false`). + +All other arguments are passed verbatim to `stdenv.mkDerivation`. + +### mkGoEnv +Arguments: +- **pwd** Path to working directory. + +All other arguments are passed verbatim to `stdenv.mkDerivation`.