Merge pull request #114233 from fabaff/version-ticker

ticker: add version
This commit is contained in:
Fabian Affolter 2021-03-01 23:10:12 +01:00 committed by GitHub
commit 8634162755
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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