about summary refs log tree commit diff
path: root/pkgs/pkgs-lib/formats.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/pkgs-lib/formats.nix')
-rw-r--r--pkgs/pkgs-lib/formats.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/pkgs-lib/formats.nix b/pkgs/pkgs-lib/formats.nix
index 1b72270b43ca4..8fc808b2646f4 100644
--- a/pkgs/pkgs-lib/formats.nix
+++ b/pkgs/pkgs-lib/formats.nix
@@ -43,6 +43,8 @@ rec {
 
   hocon = (import ./formats/hocon/default.nix { inherit lib pkgs; }).format;
 
+  php = (import ./formats/php/default.nix { inherit lib pkgs; }).format;
+
   json = {}: {
 
     type = with lib.types; let
@@ -63,6 +65,7 @@ rec {
       nativeBuildInputs = [ jq ];
       value = builtins.toJSON value;
       passAsFile = [ "value" ];
+      preferLocalBuild = true;
     } ''
       jq . "$valuePath"> $out
     '') {};
@@ -75,6 +78,7 @@ rec {
       nativeBuildInputs = [ remarshal ];
       value = builtins.toJSON value;
       passAsFile = [ "value" ];
+      preferLocalBuild = true;
     } ''
       json2yaml "$valuePath" "$out"
     '') {};
@@ -268,6 +272,7 @@ rec {
       nativeBuildInputs = [ remarshal ];
       value = builtins.toJSON value;
       passAsFile = [ "value" ];
+      preferLocalBuild = true;
     } ''
       json2toml "$valuePath" "$out"
     '') {};
@@ -465,6 +470,7 @@ rec {
           value = toConf value;
           passAsFile = [ "value" ];
           nativeBuildInputs = [ elixir ];
+          preferLocalBuild = true;
         } ''
         cp "$valuePath" "$out"
         mix format "$out"
@@ -499,6 +505,7 @@ rec {
                 print(f"{key} = {repr(value)}")
       '';
       passAsFile = [ "value" "pythonGen" ];
+      preferLocalBuild = true;
     } ''
       cat "$valuePath"
       python3 "$pythonGenPath" > $out