diff --git a/third_party/gerrit/default.nix b/third_party/gerrit/default.nix index de2fb7157..1db37afed 100644 --- a/third_party/gerrit/default.nix +++ b/third_party/gerrit/default.nix @@ -39,7 +39,10 @@ pkgs.buildBazelPackage { sha256 = "1xrckiqc2l07dib22rn6iicgvph8iyxjrzr15bs5x6jdg9cic1s8"; fetchSubmodules = true; }; - patches = [ ./use_detzip.patch ]; + patches = [ + ./use_detzip.patch + ./syntax_highlight_nix.patch + ]; bazelTarget = "release"; inherit bazel; diff --git a/third_party/gerrit/syntax_highlight_nix.patch b/third_party/gerrit/syntax_highlight_nix.patch new file mode 100644 index 000000000..2a7791c75 --- /dev/null +++ b/third_party/gerrit/syntax_highlight_nix.patch @@ -0,0 +1,12 @@ +diff --git a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js +index 1a0bbd9f50..0f2786a911 100644 +--- a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js ++++ b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js +@@ -99,6 +99,7 @@ const LANGUAGE_MAP = { + 'text/x-vhdl': 'vhdl', + 'text/x-yaml': 'yaml', + 'text/vbscript': 'vbscript', ++ 'application/x-mix-transfer': 'nix', + }; + const ASYNC_DELAY = 10; +