Skip to content

Commit

Permalink
convert languages.toml into JSON before parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Feb 18, 2022
1 parent dac982e commit f71f3b1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions overlays/helix.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ fetchFromGitHub, lib, rustPlatform, makeWrapper }:
{ fetchFromGitHub, lib, rustPlatform, makeWrapper, runCommand, yj }:

# a derivation of helix based on my fork
let
Expand All @@ -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);
Expand All @@ -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 ];
Expand Down

0 comments on commit f71f3b1

Please sign in to comment.