diff --git a/.gitignore b/.gitignore index 6f6f5e6..381ef6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,9 @@ -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib +# Built binary +/tct # Test binary, built with `go test -c` *.test -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -# Go workspace file -go.work -go.work.sum +# Nix +/.direnv/ +/result* diff --git a/nix/package.nix b/nix/package.nix index a6fc842..8bd211c 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -5,7 +5,7 @@ fs = lib.fileset; s = ../.; in - buildGoModule { + buildGoModule (finalAttrs: { pname = "tct"; version = "0.1.0"; @@ -20,5 +20,9 @@ in vendorHash = "sha256-m5mBubfbXXqXKsygF5j7cHEY+bXhAMcXUts5KBKoLzM="; - ldflags = ["-s" "-w"]; - } + ldflags = [ + "-s" + "-w" + "-X main.version=${finalAttrs.version}" + ]; + })