mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
Use fromTOML on Nix >= 2.6.0 (#1892)
This commit is contained in:
parent
58758fee61
commit
4eed4c26e9
@ -5,8 +5,10 @@ let
|
||||
languages-json = runCommand "languages-toml-to-json" { } ''
|
||||
${yj}/bin/yj -t < ${./languages.toml} > $out
|
||||
'';
|
||||
languagesConfig =
|
||||
builtins.fromJSON (builtins.readFile (builtins.toPath languages-json));
|
||||
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));
|
||||
isGitGrammar = (grammar:
|
||||
builtins.hasAttr "source" grammar && builtins.hasAttr "git" grammar.source
|
||||
&& builtins.hasAttr "rev" grammar.source);
|
||||
|
Loading…
Reference in New Issue
Block a user