9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
44 lines
875 B
Nix
44 lines
875 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, testers
|
|
, gopatch
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "gopatch";
|
|
version = "0.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "uber-go";
|
|
repo = "gopatch";
|
|
rev = "v${version}";
|
|
hash = "sha256-iiVp/Aa4usShTQD/15zYk7/WQoQL/ZxVDPWYoi3JLW4=";
|
|
};
|
|
|
|
vendorHash = "sha256-Pm5RNOx54IW7L9atfVTiMkvvzFt7yjqnYu99YiWFhPA=";
|
|
|
|
subPackages = [
|
|
"."
|
|
];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X=main._version=${version}"
|
|
];
|
|
|
|
passthru.tests = {
|
|
version = testers.testVersion {
|
|
package = gopatch;
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Refactoring and code transformation tool for Go";
|
|
homepage = "https://github.com/uber-go/gopatch";
|
|
changelog = "https://github.com/uber-go/gopatch/blob/${src.rev}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ figsoda ];
|
|
};
|
|
}
|