changeset 6775:5bb92a397ada

chore: clean up grammars.nix (#13506)
author bloxx12 <charlie@charlieroot.dev>
date Sat, 10 May 2025 12:58:48 +0000
parents 8e73da2f409f
children 580382b819f9
files grammars.nix
diffstat 1 files changed, 1 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/grammars.nix	Mon Apr 28 08:54:45 2025 +0200
+++ b/grammars.nix	Sat May 10 12:58:48 2025 +0000
@@ -1,22 +1,13 @@
 {
   stdenv,
   lib,
-  runCommandLocal,
   runCommand,
-  yj,
   includeGrammarIf ? _: true,
   grammarOverlays ? [],
   ...
 }: let
-  # HACK: nix < 2.6 has a bug in the toml parser, so we convert to JSON
-  # before parsing
-  languages-json = runCommandLocal "languages-toml-to-json" {} ''
-    ${yj}/bin/yj -t < ${./languages.toml} > $out
-  '';
   languagesConfig =
-    if lib.versionAtLeast builtins.nixVersion "2.6.0"
-    then builtins.fromTOML (builtins.readFile ./languages.toml)
-    else builtins.fromJSON (builtins.readFile (builtins.toPath languages-json));
+    builtins.fromTOML (builtins.readFile ./languages.toml);
   isGitGrammar = grammar:
     builtins.hasAttr "source" grammar
     && builtins.hasAttr "git" grammar.source