depot/third_party/nixpkgs/pkgs/by-name/pa/patch2pr/package.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

40 lines
986 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, testers
, patch2pr
}:
buildGoModule rec {
pname = "patch2pr";
version = "0.24.0";
src = fetchFromGitHub {
owner = "bluekeyes";
repo = "patch2pr";
rev = "v${version}";
hash = "sha256-ot/PECNRuhJUYX1woektKC6VEV+rLKiSnCVCLIRhSUo=";
};
vendorHash = "sha256-K2qYfS0A1gOo2n3pBy00oLbd1/q/p5N8RoId+OP1Jmw=";
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";
};
}