From 158eda06de31a52f15712fa0e5695054d15dfe3a Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 19 Jul 2022 15:53:39 +0200 Subject: [PATCH] Format + documentation --- README.md | 9 +++++++++ default.nix | 22 +++++++++------------- directory.go | 2 +- invite.go | 4 ++-- main.go | 19 +++++++++---------- profile.go | 2 +- 6 files changed, 31 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index fad0594..9751fab 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,15 @@ Guichet requires go 1.13 or later. To build Guichet, clone this repository outside of your `$GOPATH`. Then, run `make` in the root of the repo. +## Releasing Guichet + +To build Guichet in a controlled environment, because you plan to release it for example, please use Nix. + +```bash +nix-build -A bin # build only the Go binary +nix-build -A pkg # build the binary and add the ressources +nix-build -A docker # build a docker container +``` ## Configuration of Guichet diff --git a/default.nix b/default.nix index 24b759c..cd17475 100644 --- a/default.nix +++ b/default.nix @@ -11,7 +11,8 @@ let }) ]; }; - bin = pkgs.gomod.buildGoApplication { +in rec { + bin = pkgs.gomod.buildGoApplication { pname = "guichet-bin"; version = "0.1.0"; src = ./.; @@ -26,23 +27,18 @@ let platforms = platforms.linux; }; }; -in - pkgs.stdenv.mkDerivation { + pkg = pkgs.stdenv.mkDerivation { pname = "guichet"; version = "0.1.0"; src = ./.; installPhase = '' mkdir -p $out/ - - cat > guichet <