depot/third_party/nixpkgs/pkgs/tools/misc/svu/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

32 lines
842 B
Nix

{ lib, buildGoModule, fetchFromGitHub, testers, svu }:
buildGoModule rec {
pname = "svu";
version = "1.12.0";
src = fetchFromGitHub {
owner = "caarlos0";
repo = pname;
rev = "v${version}";
sha256 = "sha256-MztFramrNqxYmdTRf857HOC7H66dLvezG6LL9njxWUs=";
};
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;
mainProgram = "svu";
};
}