ticker: add version

This commit is contained in:
Fabian Affolter 2021-03-01 10:22:23 +01:00
parent b1efbc6aa3
commit ea686ee5b3

View file

@ -1,4 +1,7 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "ticker";
@ -6,13 +9,17 @@ buildGoModule rec {
src = fetchFromGitHub {
owner = "achannarasappa";
repo = "ticker";
repo = pname;
rev = "v${version}";
sha256 = "sha256-OA01GYp6E0zsEwkUUtvpmvl0y/YTXChl0pwIKozB4Qg=";
};
vendorSha256 = "sha256-aUBj7ZGWBeWc71y1CWm/KCw+El5TwH29S+KxyZGH1Zo=";
preBuild = ''
buildFlagsArray+=("-ldflags" "-s -w -X github.com/achannarasappa/ticker/cmd.Version=v${version}")
'';
# Tests require internet
doCheck = false;