15 src = fetchFromGitHub {
19 hash = "sha256-QBU04/w7Z8yaTzDqhiVcxC8xEuDpDJs7rNRpOtwodGg=";
22 vendorHash = "sha256-4JSmn/TUojZjCQMZCgJic0y84VMP26J7uBybB5/BCoE=";
25 # Skip a test that requires networking to be available to work.
26 ./skip_test_requiring_network.patch
29 nativeBuildInputs = [ installShellFiles ];
31 ldflags = [ "-s" "-w" ];
34 git # Required for TestGitCloner
35 protobuf # Required for buftesting.GetProtocFilePaths
39 # The tests need access to some of the built utilities
40 export PATH="$PATH:$GOPATH/bin"
43 # Allow tests that bind or connect to localhost on macOS.
44 __darwinAllowLocalNetworking = true;
50 # Only install required binaries, don't install testing binaries
51 for FILE in buf protoc-gen-buf-breaking protoc-gen-buf-lint; do
52 install -D -m 555 -t $out/bin $GOPATH/bin/$FILE
56 installShellCompletion --cmd buf \
57 --bash <($GOPATH/bin/buf completion bash) \
58 --fish <($GOPATH/bin/buf completion fish) \
59 --zsh <($GOPATH/bin/buf completion zsh)
62 mkdir man && $GOPATH/bin/buf manpages man
68 passthru.tests.version = testers.testVersion { package = buf; };
71 homepage = "https://buf.build";
72 changelog = "https://github.com/bufbuild/buf/releases/tag/v${version}";
73 description = "Create consistent Protobuf APIs that preserve compatibility and comply with design best-practices";
74 license = licenses.asl20;
75 maintainers = with maintainers; [ jk lrewega ];