snicat: set ldflags
This commit is contained in:
parent
5a072b4a9d
commit
6f0036ddc2
1 changed files with 2 additions and 10 deletions
|
@ -1,5 +1,4 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
|
||||||
, buildGoPackage
|
, buildGoPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
}:
|
}:
|
||||||
|
@ -14,19 +13,12 @@ buildGoPackage rec {
|
||||||
hash = "sha256-fFlTBOz127le2Y7F9KKhbcldcyFEpAU5QiJ4VCAPs9Y=";
|
hash = "sha256-fFlTBOz127le2Y7F9KKhbcldcyFEpAU5QiJ4VCAPs9Y=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patchPhase = ''
|
|
||||||
runHook prePatch
|
|
||||||
|
|
||||||
substituteInPlace snicat.go \
|
|
||||||
--replace-warn "v0.0.0" "v${version}"
|
|
||||||
|
|
||||||
runHook postPatch
|
|
||||||
'';
|
|
||||||
|
|
||||||
goPackagePath = "github.com/CTFd/snicat";
|
goPackagePath = "github.com/CTFd/snicat";
|
||||||
|
|
||||||
goDeps = ./deps.nix;
|
goDeps = ./deps.nix;
|
||||||
|
|
||||||
|
ldflags = [ "-s" "-w" "-X main.version=v${version}" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue