Switch to python3 for json formatting
This commit is contained in:
parent
ed86976d84
commit
65f7f1c542
|
@ -5,13 +5,12 @@ let
|
||||||
get-basename-without-hash = filename:
|
get-basename-without-hash = filename:
|
||||||
head (builtins.match "^[a-zA-Z0-9]+-(.+)$" (baseNameOf filename));
|
head (builtins.match "^[a-zA-Z0-9]+-(.+)$" (baseNameOf filename));
|
||||||
|
|
||||||
format-json-file = filename: pkgs.stdenv.mkDerivation {
|
format-json-file = filename:
|
||||||
name = "formatted-${get-basename-without-hash filename}";
|
pkgs.stdenv.mkDerivation {
|
||||||
phases = [ "installPhase" ];
|
name = "formatted-${get-basename-without-hash filename}";
|
||||||
buildInputs = with pkgs; [ python ];
|
phases = [ "installPhase" ];
|
||||||
installPhase = "python -mjson.tool ${filename} > $out";
|
buildInputs = with pkgs; [ python3 ];
|
||||||
};
|
installPhase = "python -mjson.tool ${filename} > $out";
|
||||||
|
};
|
||||||
|
|
||||||
in {
|
in { inherit format-json-file; }
|
||||||
inherit format-json-file;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue