depot/pkgs/by-name/pa/patch2pr/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

40 lines
986 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, testers
, patch2pr
}:
buildGoModule rec {
pname = "patch2pr";
version = "0.29.0";
src = fetchFromGitHub {
owner = "bluekeyes";
repo = "patch2pr";
rev = "v${version}";
hash = "sha256-eWOzK08ZlNORaRRtDumxOhsQWNXxk48jxcanwhEOChY=";
};
vendorHash = "sha256-x2w1HYrJo0HqyGGlIaxKqy1XYj/akQm0ijbYuK7qg58=";
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";
};
}