biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / tools / cobra-cli / default.nix
blobd94ef657d741450424e063d6ffbb93c339d5acd6
1 { lib, buildGoModule, fetchFromGitHub, makeWrapper, go }:
3 buildGoModule rec {
4   pname = "cobra-cli";
5   version = "1.3.0";
7   src = fetchFromGitHub {
8     owner = "spf13";
9     repo = pname;
10     rev = "v${version}";
11     sha256 = "sha256-E0I/Pxw4biOv7aGVzGlQOFXnxkc+zZaEoX1JmyMh6UE=";
12   };
14   vendorHash = "sha256-vrtGPQzY+NImOGaSxV+Dvch+GNPfL9XfY4lfCHTGXwY=";
16   nativeBuildInputs = [ makeWrapper ];
18   allowGoReference = true;
20   postPatch = ''
21     substituteInPlace "cmd/add_test.go" \
22       --replace "TestGoldenAddCmd" "SkipGoldenAddCmd"
23     substituteInPlace "cmd/init_test.go" \
24       --replace "TestGoldenInitCmd" "SkipGoldenInitCmd"
25   '';
27   postFixup = ''
28     wrapProgram "$out/bin/cobra-cli" \
29       --prefix PATH : ${go}/bin
30   '';
32   meta = with lib; {
33     description = "Cobra CLI tool to generate applications and commands";
34     mainProgram = "cobra-cli";
35     homepage = "https://github.com/spf13/cobra-cli/";
36     changelog = "https://github.com/spf13/cobra-cli/releases/tag/${version}";
37     license = licenses.afl20;
38     maintainers = [ maintainers.ivankovnatsky ];
39   };