From 65f7f1c5425d775ac56a5cdc9555ff05628d0049 Mon Sep 17 00:00:00 2001 From: niten Date: Tue, 27 Jun 2023 16:23:27 -0700 Subject: [PATCH] Switch to python3 for json formatting --- lib/lib/text.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/lib/text.nix b/lib/lib/text.nix index d6cdab4..b0bf1b8 100644 --- a/lib/lib/text.nix +++ b/lib/lib/text.nix @@ -5,13 +5,12 @@ let get-basename-without-hash = filename: head (builtins.match "^[a-zA-Z0-9]+-(.+)$" (baseNameOf filename)); - format-json-file = filename: pkgs.stdenv.mkDerivation { - name = "formatted-${get-basename-without-hash filename}"; - phases = [ "installPhase" ]; - buildInputs = with pkgs; [ python ]; - installPhase = "python -mjson.tool ${filename} > $out"; - }; + format-json-file = filename: + pkgs.stdenv.mkDerivation { + name = "formatted-${get-basename-without-hash filename}"; + phases = [ "installPhase" ]; + buildInputs = with pkgs; [ python3 ]; + installPhase = "python -mjson.tool ${filename} > $out"; + }; -in { - inherit format-json-file; -} +in { inherit format-json-file; }