diff --git a/pkgs/by-name/pa/patch2pr/package.nix b/pkgs/by-name/pa/patch2pr/package.nix new file mode 100644 index 000000000000..2bc4b0b5a933 --- /dev/null +++ b/pkgs/by-name/pa/patch2pr/package.nix @@ -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"; + }; +}