Switch to python3 for json formatting

This commit is contained in:
niten 2023-06-27 16:23:27 -07:00
parent ed86976d84
commit 65f7f1c542
1 changed files with 8 additions and 9 deletions

View File

@ -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; }