1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-03 02:51:18 +00:00

Merge pull request #117575 from raboof/buf-init-at-0.40.0

buf: init at 0.40.0
This commit is contained in:
Sandro 2021-03-26 00:03:17 +01:00 committed by GitHub
commit dd84a7fd7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,36 @@
{ lib
, buildGoModule
, fetchFromGitHub
, protobuf
}:
buildGoModule rec {
pname = "buf";
version = "0.40.0";
src = fetchFromGitHub {
owner = "bufbuild";
repo = pname;
rev = "v${version}";
sha256 = "sha256-N6o+1cfer8rgKJ3+CL25axJSjGV/YSG1sLIHXJzsC6o=";
};
patches = [
./skip_test_requiring_network.patch
];
preCheck = ''
export PATH=$PATH:$GOPATH/bin
'';
nativeBuildInputs = [ protobuf ];
vendorSha256 = "sha256-vl+WqtpegoAvylx/lcyfJk8DAOub8U4Lx3Pe3eW4M/E=";
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 ];
};
}

View file

@ -0,0 +1,15 @@
diff --git a/internal/buf/internal/buftesting/buftesting.go b/internal/buf/internal/buftesting/buftesting.go
index dc8da0c..70ad299 100644
--- a/internal/buf/internal/buftesting/buftesting.go
+++ b/internal/buf/internal/buftesting/buftesting.go
@@ -100,6 +100,10 @@ func RunActualProtoc(
// GetGoogleapisDirPath gets the path to a clone of googleapis.
func GetGoogleapisDirPath(t *testing.T, buftestingDirPath string) string {
+ // Requires network access, which is not available during
+ // the nixpkgs sandboxed build
+ t.Skip()
+
googleapisDirPath := filepath.Join(buftestingDirPath, testGoogleapisDirPath)
require.NoError(
t,

View file

@ -168,6 +168,8 @@ in
breakpad = callPackage ../development/misc/breakpad { };
buf = callPackage ../development/tools/buf { };
# Zip file format only allows times after year 1980, which makes e.g. Python wheel building fail with:
# ValueError: ZIP does not support timestamps before 1980
ensureNewerSourcesForZipFilesHook = ensureNewerSourcesHook { year = "1980"; };