mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-31 20:54:56 +00:00
42 lines
1.0 KiB
Nix
42 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
testers,
|
|
patch2pr,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "patch2pr";
|
|
version = "0.47.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bluekeyes";
|
|
repo = "patch2pr";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-+f7GhaRzSaFR/vFsbaizqKVcaIz6fAjFhVopnjvqblI=";
|
|
};
|
|
|
|
vendorHash = "sha256-EpJdG8Xy2077zjqgwae5Fr89y7MQYYNOfAjuZxS0wjA=";
|
|
|
|
ldflags = [
|
|
"-X main.version=${finalAttrs.version}"
|
|
"-X main.commit=${finalAttrs.src.rev}"
|
|
];
|
|
|
|
passthru.tests.patch2pr-version = testers.testVersion {
|
|
package = patch2pr;
|
|
command = "${patch2pr.meta.mainProgram} --version";
|
|
version = finalAttrs.version;
|
|
};
|
|
|
|
meta = {
|
|
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${finalAttrs.version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ katrinafyi ];
|
|
mainProgram = "patch2pr";
|
|
};
|
|
})
|