depot/third_party/nixpkgs/pkgs/development/tools/misc/gopatch/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

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 ];
};
}