nixpkgs/pkgs/by-name/pa/patch2pr/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
986 B
Nix
Raw Normal View History

2024-02-24 05:16:38 -05:00
{ lib
, buildGoModule
, fetchFromGitHub
, testers
, patch2pr
}:
buildGoModule rec {
pname = "patch2pr";
2024-09-26 03:58:54 -04:00
version = "0.28.0";
2024-02-24 05:16:38 -05:00
src = fetchFromGitHub {
owner = "bluekeyes";
repo = "patch2pr";
rev = "v${version}";
2024-09-26 03:58:54 -04:00
hash = "sha256-Pr2h5iezn//oyvuUoq5B49wEL1cUXOHhHjR3ylMXowQ=";
2024-02-24 05:16:38 -05:00
};
2024-09-26 03:58:54 -04:00
vendorHash = "sha256-6w49XQNElSHpOamEZNpvvr67vYrZYXy2Sm7dWMh6OiU=";
2024-02-24 05:16:38 -05:00
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";
};
}