depot/third_party/nixpkgs/pkgs/development/tools/misc/gopatch/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

44 lines
875 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, testers
, gopatch
}:
buildGoModule rec {
pname = "gopatch";
version = "0.2.0";
src = fetchFromGitHub {
owner = "uber-go";
repo = "gopatch";
rev = "v${version}";
hash = "sha256-RodRDP7n1hxez+9xpRlguuArJDVaYxVTpnXKqsyqnUw=";
};
vendorHash = "sha256-vygEVVh/bBhV/FCrehDumrw2c1SdSZSdFjVSRoJsIig=";
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 ];
};
}