nixpkgs/pkgs/tools/misc/svu/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
842 B
Nix
Raw Normal View History

2023-03-28 13:30:02 +00:00
{ lib, buildGoModule, fetchFromGitHub, testers, svu }:
buildGoModule rec {
pname = "svu";
2023-12-06 12:03:27 +00:00
version = "1.12.0";
2023-03-28 13:30:02 +00:00
src = fetchFromGitHub {
owner = "caarlos0";
repo = pname;
rev = "v${version}";
2023-12-06 12:03:27 +00:00
sha256 = "sha256-MztFramrNqxYmdTRf857HOC7H66dLvezG6LL9njxWUs=";
2023-03-28 13:30:02 +00:00
};
vendorHash = "sha256-+e1oL08KvBSNaRepGR2SBBrEDJaGxl5V9rOBysGEfQs=";
ldflags = [ "-s" "-w" "-X=main.version=${version}" "-X=main.builtBy=nixpkgs" ];
# test assumes source directory to be a git repository
postPatch = ''
rm internal/git/git_test.go
'';
passthru.tests.version = testers.testVersion { package = svu; };
meta = with lib; {
description = "Semantic Version Util";
homepage = "https://github.com/caarlos0/svu";
maintainers = with maintainers; [ caarlos0 ];
license = licenses.mit;
2023-11-27 01:17:53 +00:00
mainProgram = "svu";
2023-03-28 13:30:02 +00:00
};
}