diff --git a/pkgs/by-name/zi/zitadel/console-use-local-protobuf-plugins.patch b/pkgs/by-name/zi/zitadel/console-use-local-protobuf-plugins.patch new file mode 100644 index 000000000000..4babb92b25f9 --- /dev/null +++ b/pkgs/by-name/zi/zitadel/console-use-local-protobuf-plugins.patch @@ -0,0 +1,21 @@ +diff --git a/console/buf.gen.yaml b/console/buf.gen.yaml +index 1737c2ded..d6affa8bc 100644 +--- a/console/buf.gen.yaml ++++ b/console/buf.gen.yaml +@@ -3,12 +3,12 @@ version: v1 + managed: + enabled: true + plugins: +- - plugin: buf.build/protocolbuffers/js ++ - plugin: js + out: src/app/proto/generated + opt: import_style=commonjs,binary +- - plugin: buf.build/grpc/web ++ - plugin: grpc-web + out: src/app/proto/generated + opt: import_style=typescript,mode=grpcweb +- - plugin: buf.build/grpc-ecosystem/openapiv2 ++ - plugin: openapiv2 + out: src/app/proto/generated + opt: allow_delete_body +\ No newline at end of file diff --git a/pkgs/by-name/zi/zitadel/console.nix b/pkgs/by-name/zi/zitadel/console.nix index b9ec209dda73..bd67c47e5743 100644 --- a/pkgs/by-name/zi/zitadel/console.nix +++ b/pkgs/by-name/zi/zitadel/console.nix @@ -6,15 +6,24 @@ { mkYarnPackage , fetchYarnDeps , lib + +, grpc-gateway +, protoc-gen-grpc-web +, protoc-gen-js }: let protobufGenerated = generateProtobufCode { pname = "zitadel-console"; + nativeBuildInputs = [ + grpc-gateway + protoc-gen-grpc-web + protoc-gen-js + ]; workDir = "console"; bufArgs = "../proto --include-imports --include-wkt"; outputPath = "src/app/proto"; - hash = "sha256-NmlKjKWxmqatyR6OitlQ7bfl6U6PS6KWqTALwX42HS4="; + hash = "sha256-Bpoe1UZGLTxUqdLbvOod6/77R4CsYQ4PirMfqvI9Lz8="; }; in mkYarnPackage rec { diff --git a/pkgs/by-name/zi/zitadel/package.nix b/pkgs/by-name/zi/zitadel/package.nix index 03216c406209..aa2a0be622eb 100644 --- a/pkgs/by-name/zi/zitadel/package.nix +++ b/pkgs/by-name/zi/zitadel/package.nix @@ -62,6 +62,7 @@ let name = "${pname}-buf-generated"; src = zitadelRepo; + patches = [ ./console-use-local-protobuf-plugins.patch ]; nativeBuildInputs = nativeBuildInputs ++ [ buf ];