zitadel: use local plugins for console protobuf generation

Previously, the console portion of ZITADEL used Buf remote plugins to generate
sources. This resulted in the hash for the protobuf generated code changing
whenever the remote builders changed. This change patches the console
configuration to use local plugins from Nixpkgs instead of remote ones, to
ensure the output isn't influenced by remote changes.

+32 -1
+21
pkgs/by-name/zi/zitadel/console-use-local-protobuf-plugins.patch
··· 1 + diff --git a/console/buf.gen.yaml b/console/buf.gen.yaml 2 + index 1737c2ded..d6affa8bc 100644 3 + --- a/console/buf.gen.yaml 4 + +++ b/console/buf.gen.yaml 5 + @@ -3,12 +3,12 @@ version: v1 6 + managed: 7 + enabled: true 8 + plugins: 9 + - - plugin: buf.build/protocolbuffers/js 10 + + - plugin: js 11 + out: src/app/proto/generated 12 + opt: import_style=commonjs,binary 13 + - - plugin: buf.build/grpc/web 14 + + - plugin: grpc-web 15 + out: src/app/proto/generated 16 + opt: import_style=typescript,mode=grpcweb 17 + - - plugin: buf.build/grpc-ecosystem/openapiv2 18 + + - plugin: openapiv2 19 + out: src/app/proto/generated 20 + opt: allow_delete_body 21 + \ No newline at end of file
+10 -1
pkgs/by-name/zi/zitadel/console.nix
··· 6 6 { mkYarnPackage 7 7 , fetchYarnDeps 8 8 , lib 9 + 10 + , grpc-gateway 11 + , protoc-gen-grpc-web 12 + , protoc-gen-js 9 13 }: 10 14 11 15 let 12 16 protobufGenerated = generateProtobufCode { 13 17 pname = "zitadel-console"; 18 + nativeBuildInputs = [ 19 + grpc-gateway 20 + protoc-gen-grpc-web 21 + protoc-gen-js 22 + ]; 14 23 workDir = "console"; 15 24 bufArgs = "../proto --include-imports --include-wkt"; 16 25 outputPath = "src/app/proto"; 17 - hash = "sha256-NmlKjKWxmqatyR6OitlQ7bfl6U6PS6KWqTALwX42HS4="; 26 + hash = "sha256-Bpoe1UZGLTxUqdLbvOod6/77R4CsYQ4PirMfqvI9Lz8="; 18 27 }; 19 28 in 20 29 mkYarnPackage rec {
+1
pkgs/by-name/zi/zitadel/package.nix
··· 62 62 name = "${pname}-buf-generated"; 63 63 64 64 src = zitadelRepo; 65 + patches = [ ./console-use-local-protobuf-plugins.patch ]; 65 66 66 67 nativeBuildInputs = nativeBuildInputs ++ [ buf ]; 67 68