Merge pull request #160546 from aaronjheng/buf

This commit is contained in:
Sandro 2022-02-18 17:25:31 +01:00 committed by GitHub
commit c2648c6d0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,15 +10,16 @@
buildGoModule rec { buildGoModule rec {
pname = "buf"; pname = "buf";
version = "1.0.0-rc12"; version = "1.0.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "bufbuild"; owner = "bufbuild";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-UqyWQdlCDTSjW348f87W7g2kwB5nzIOviSE5/1T1soY="; sha256 = "sha256-jJaob2eaozMFRsXwW6ulgM5De3UmpLZddTHwq6PnaeE=";
}; };
vendorSha256 = "sha256-qBgGZTok3G0Pgku76uiV9bZperhiSNoWSrzxrHe4QXw=";
vendorSha256 = "sha256-wPnrkfv6pJB6tkZo2oeMbWHbF9njGh1ZEWu8tkHDhGo=";
patches = [ patches = [
# Skip a test that requires networking to be available to work. # Skip a test that requires networking to be available to work.
@ -27,12 +28,15 @@ buildGoModule rec {
./skip_test_requiring_dotgit.patch ./skip_test_requiring_dotgit.patch
]; ];
nativeBuildInputs = [ protobuf installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
# Required for TestGitCloner
checkInputs = [ git ];
ldflags = [ "-s" "-w" ]; ldflags = [ "-s" "-w" ];
checkInputs = [
git # Required for TestGitCloner
protobuf # Required for buftesting.GetProtocFilePaths
];
preCheck = '' preCheck = ''
# The tests need access to some of the built utilities # The tests need access to some of the built utilities
export PATH="$PATH:$GOPATH/bin" export PATH="$PATH:$GOPATH/bin"
@ -55,9 +59,9 @@ buildGoModule rec {
# Completions # Completions
installShellCompletion --cmd buf \ installShellCompletion --cmd buf \
--bash <($GOPATH/bin/buf bash-completion) \ --bash <($GOPATH/bin/buf completion bash) \
--fish <($GOPATH/bin/buf fish-completion) \ --fish <($GOPATH/bin/buf completion fish) \
--zsh <($GOPATH/bin/buf zsh-completion) --zsh <($GOPATH/bin/buf completion zsh)
# Man Pages # Man Pages
mkdir man && $GOPATH/bin/buf manpages man mkdir man && $GOPATH/bin/buf manpages man