From f71f3b14d03069a350be40683d0a91448a823896 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Fri, 18 Feb 2022 08:45:55 -0600 Subject: [PATCH] convert languages.toml into JSON before parsing --- overlays/helix.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/overlays/helix.nix b/overlays/helix.nix index 50e232a..dfe1790 100644 --- a/overlays/helix.nix +++ b/overlays/helix.nix @@ -1,4 +1,4 @@ -{ fetchFromGitHub, lib, rustPlatform, makeWrapper }: +{ fetchFromGitHub, lib, rustPlatform, makeWrapper, runCommand, yj }: # a derivation of helix based on my fork let @@ -14,7 +14,10 @@ let # sha256 = lib.fakeSha256; }; - config = builtins.fromTOML (builtins.readFile "${src}/languages.toml"); + languages-json = runCommand "languages-toml-to-json" {} '' + ${yj}/bin/yj -t < ${src}/languages.toml > $out + ''; + config = builtins.fromJSON (builtins.readFile (builtins.toPath languages-json)); isGitGrammar = (grammar: builtins.hasAttr "source" grammar && builtins.hasAttr "git" grammar.source && builtins.hasAttr "rev" grammar.source); @@ -36,9 +39,9 @@ in rustPlatform.buildRustPackage rec { inherit src; pname = "helix"; - version = "0.6.0.4-tmd"; + version = "0.6.0.5-tmd"; - cargoSha256 = "sha256-VOLm7/hmNUX21skw8hp9ep9svenqq5D0MVxwctKihts="; + cargoSha256 = "sha256-KYu8s9d8DbU3oGvu/hhYCW0T5GWsEcB1uqnuXXxaAlA="; # cargoSha256 = lib.fakeSha256; nativeBuildInputs = [ makeWrapper ];