patch2pr: init at 0.21.0

This commit is contained in:
rina 2024-02-24 20:16:38 +10:00
parent 2ea79083c5
commit 7897fc4abb

View File

@ -0,0 +1,40 @@
{ lib
, buildGoModule
, fetchFromGitHub
, testers
, patch2pr
}:
buildGoModule rec {
pname = "patch2pr";
version = "0.21.0";
src = fetchFromGitHub {
owner = "bluekeyes";
repo = "patch2pr";
rev = "v${version}";
hash = "sha256-NG6I7tsgmKV5dzBX/f/FxSpfi1pZ5EWMmkIW2l3u6Is=";
};
vendorHash = "sha256-mJ6Gprsh74wCzkqp2zy6F60i7rQusZK8FXLP6Z9XA3Q=";
ldflags = [
"-X main.version=${version}"
"-X main.commit=${src.rev}"
];
passthru.tests.patch2pr-version = testers.testVersion {
package = patch2pr;
command = "${patch2pr.meta.mainProgram} --version";
version = version;
};
meta = with lib; {
description = "Create pull requests from patches without cloning the repository";
homepage = "https://github.com/bluekeyes/patch2pr";
changelog = "https://github.com/bluekeyes/patch2pr/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ katrinafyi ];
mainProgram = "patch2pr";
};
}