mirror of
https://github.com/NotAShelf/tct.git
synced 2025-10-02 15:03:48 +00:00
nix: inject version string in build
This commit is contained in:
parent
1dd971e16b
commit
cfad0e9b12
2 changed files with 12 additions and 21 deletions
23
.gitignore
vendored
23
.gitignore
vendored
|
@ -1,22 +1,9 @@
|
||||||
# If you prefer the allow list template instead of the deny list, see community template:
|
# Built binary
|
||||||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
/tct
|
||||||
#
|
|
||||||
# Binaries for programs and plugins
|
|
||||||
*.exe
|
|
||||||
*.exe~
|
|
||||||
*.dll
|
|
||||||
*.so
|
|
||||||
*.dylib
|
|
||||||
|
|
||||||
# Test binary, built with `go test -c`
|
# Test binary, built with `go test -c`
|
||||||
*.test
|
*.test
|
||||||
|
|
||||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
# Nix
|
||||||
*.out
|
/.direnv/
|
||||||
|
/result*
|
||||||
# Dependency directories (remove the comment below to include it)
|
|
||||||
# vendor/
|
|
||||||
|
|
||||||
# Go workspace file
|
|
||||||
go.work
|
|
||||||
go.work.sum
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
fs = lib.fileset;
|
fs = lib.fileset;
|
||||||
s = ../.;
|
s = ../.;
|
||||||
in
|
in
|
||||||
buildGoModule {
|
buildGoModule (finalAttrs: {
|
||||||
pname = "tct";
|
pname = "tct";
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
|
|
||||||
|
@ -20,5 +20,9 @@ in
|
||||||
|
|
||||||
vendorHash = "sha256-m5mBubfbXXqXKsygF5j7cHEY+bXhAMcXUts5KBKoLzM=";
|
vendorHash = "sha256-m5mBubfbXXqXKsygF5j7cHEY+bXhAMcXUts5KBKoLzM=";
|
||||||
|
|
||||||
ldflags = ["-s" "-w"];
|
ldflags = [
|
||||||
}
|
"-s"
|
||||||
|
"-w"
|
||||||
|
"-X main.version=${finalAttrs.version}"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue