about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathieu Rene <mathieu.rene@gmail.com>2024-01-20 18:10:20 -0500
committerYaya <github@uwu.is>2024-01-21 11:45:55 +0100
commit3ac135b6a9bd9a606a7057e0c10b017f7ba11ed6 (patch)
treebce7050a6b29dbb5db7f2734b3c59223a29ddbd4
parent7f3590412b146e661e83587b7537bb3d3cc56b20 (diff)
buf: 1.27.0 -> 1.28.1
-rw-r--r--pkgs/development/tools/buf/default.nix11
-rw-r--r--pkgs/development/tools/buf/skip_broken_tests.patch28
-rw-r--r--pkgs/development/tools/buf/skip_test_requiring_network.patch15
3 files changed, 34 insertions, 20 deletions
diff --git a/pkgs/development/tools/buf/default.nix b/pkgs/development/tools/buf/default.nix
index 5a1a1508b42e7..530c2609c135e 100644
--- a/pkgs/development/tools/buf/default.nix
+++ b/pkgs/development/tools/buf/default.nix
@@ -10,20 +10,21 @@
 
 buildGoModule rec {
   pname = "buf";
-  version = "1.27.0";
+  version = "1.28.1";
 
   src = fetchFromGitHub {
     owner = "bufbuild";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-QBU04/w7Z8yaTzDqhiVcxC8xEuDpDJs7rNRpOtwodGg=";
+    hash = "sha256-wFUSf3+EZa1pzpKci4dPa9MVfNk5XQHraUFcoiTd/0Q=";
   };
 
-  vendorHash = "sha256-4JSmn/TUojZjCQMZCgJic0y84VMP26J7uBybB5/BCoE=";
+  vendorHash = "sha256-REAU2FoEYWRYlPQel6oDLLdhbJOiGRaWZO6inefSd3M=";
 
   patches = [
-    # Skip a test that requires networking to be available to work.
-    ./skip_test_requiring_network.patch
+    # Skip a test that requires networking to be available to work,
+    # and a test which requires the source checkout to be part of a git repository
+    ./skip_broken_tests.patch
   ];
 
   nativeBuildInputs = [ installShellFiles ];
diff --git a/pkgs/development/tools/buf/skip_broken_tests.patch b/pkgs/development/tools/buf/skip_broken_tests.patch
new file mode 100644
index 0000000000000..c25f8c8c93043
--- /dev/null
+++ b/pkgs/development/tools/buf/skip_broken_tests.patch
@@ -0,0 +1,28 @@
+diff --git a/private/buf/cmd/buf/workspace_unix_test.go b/private/buf/cmd/buf/workspace_unix_test.go
+index 22c84385..22548555 100644
+--- a/private/buf/cmd/buf/workspace_unix_test.go
++++ b/private/buf/cmd/buf/workspace_unix_test.go
+@@ -93,6 +93,8 @@ func TestWorkspaceAbsoluteFail(t *testing.T) {
+ // Workflow run: https://github.com/bufbuild/buf/actions/runs/6510804063/job/17685247791.
+ // Potential fix: https://stackoverflow.com/questions/22575662/filename-too-long-in-git-for-windows.
+ func TestWorkspaceGit(t *testing.T) {
++	// Fails because the source checkout is not part of a git repository while building with nix
++	t.Skip()
+ 	// Directory paths specified as a git reference within a workspace.
+ 	t.Parallel()
+ 	testRunStdout(
+diff --git a/private/bufpkg/buftesting/buftesting.go b/private/bufpkg/buftesting/buftesting.go
+index d9e1fdc6..6e08c439 100644
+--- a/private/bufpkg/buftesting/buftesting.go
++++ b/private/bufpkg/buftesting/buftesting.go
+@@ -104,6 +104,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,
diff --git a/pkgs/development/tools/buf/skip_test_requiring_network.patch b/pkgs/development/tools/buf/skip_test_requiring_network.patch
deleted file mode 100644
index 1b0cdfb12c03d..0000000000000
--- a/pkgs/development/tools/buf/skip_test_requiring_network.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/private/bufpkg/buftesting/buftesting.go b/private/bufpkg/buftesting/buftesting.go
-index 82b3ec4..ef8263a 100644
---- a/private/bufpkg/buftesting/buftesting.go
-+++ b/private/bufpkg/buftesting/buftesting.go
-@@ -99,6 +99,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,