nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 testers,
6 patch2pr,
7}:
8
9buildGoModule rec {
10 pname = "patch2pr";
11 version = "0.41.0";
12
13 src = fetchFromGitHub {
14 owner = "bluekeyes";
15 repo = "patch2pr";
16 rev = "v${version}";
17 hash = "sha256-mln6MVPZRbW2XgTaVAGiK87MkHPPEzFgHaNnacKym8g=";
18 };
19
20 vendorHash = "sha256-nLpS0JbdqFMK2+ycZZC93HWPCS0+k7tyl1pB/T6fPjA=";
21
22 ldflags = [
23 "-X main.version=${version}"
24 "-X main.commit=${src.rev}"
25 ];
26
27 passthru.tests.patch2pr-version = testers.testVersion {
28 package = patch2pr;
29 command = "${patch2pr.meta.mainProgram} --version";
30 version = version;
31 };
32
33 meta = {
34 description = "Create pull requests from patches without cloning the repository";
35 homepage = "https://github.com/bluekeyes/patch2pr";
36 changelog = "https://github.com/bluekeyes/patch2pr/releases/tag/v${version}";
37 license = lib.licenses.mit;
38 maintainers = with lib.maintainers; [ katrinafyi ];
39 mainProgram = "patch2pr";
40 };
41}