about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/buf/default.nix
blob: 8d76b8925dc70d4640dc09ba86721bd8880e0182 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib
, buildGoModule
, fetchFromGitHub
, protobuf
}:

buildGoModule rec {
  pname = "buf";
  version = "0.41.0";

  src = fetchFromGitHub {
    owner = "bufbuild";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-f1UcvsXWW+fMAgTRtHkEXmUN/DTrJ/Xd+9HbR2FjFog=";
  };

  patches = [
    ./skip_test_requiring_network.patch
  ];

  preCheck = ''
    export PATH=$PATH:$GOPATH/bin
  '';

  nativeBuildInputs = [ protobuf ];

  vendorSha256 = "sha256-XMGXVsSLEzuzujX5Fg3LLkgzyJY+nIBJEO9iI2t9eGc=";

  meta = with lib; {
    description = "Create consistent Protobuf APIs that preserve compatibility and comply with design best-practices";
    homepage = "https://buf.build";
    license = licenses.asl20;
    maintainers = with maintainers; [ raboof ];
  };
}