diff options
author | nicoo <nicoo@mur.at> | 2024-05-25 17:27:40 +0000 |
---|---|---|
committer | nicoo <nicoo@mur.at> | 2024-05-25 17:27:40 +0000 |
commit | 3fa359407eb8a5ade31efbdffacd90b478184a5c (patch) | |
tree | cc0b921ef1b43d87a7be84de64b3657fe532d85b /pkgs/pkgs-lib | |
parent | b1289a4ced02a2df01f4d7a46d536601e653a6fe (diff) |
formats: Set `preferLocalBuild` in `generate` builders
Otherwise, remote builds are used for trivial format conversions.
Diffstat (limited to 'pkgs/pkgs-lib')
-rw-r--r-- | pkgs/pkgs-lib/formats.nix | 5 | ||||
-rw-r--r-- | pkgs/pkgs-lib/formats/hocon/default.nix | 1 | ||||
-rw-r--r-- | pkgs/pkgs-lib/formats/libconfig/default.nix | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/pkgs-lib/formats.nix b/pkgs/pkgs-lib/formats.nix index 7cc0bf4f4e504..8fc808b2646f4 100644 --- a/pkgs/pkgs-lib/formats.nix +++ b/pkgs/pkgs-lib/formats.nix @@ -65,6 +65,7 @@ rec { nativeBuildInputs = [ jq ]; value = builtins.toJSON value; passAsFile = [ "value" ]; + preferLocalBuild = true; } '' jq . "$valuePath"> $out '') {}; @@ -77,6 +78,7 @@ rec { nativeBuildInputs = [ remarshal ]; value = builtins.toJSON value; passAsFile = [ "value" ]; + preferLocalBuild = true; } '' json2yaml "$valuePath" "$out" '') {}; @@ -270,6 +272,7 @@ rec { nativeBuildInputs = [ remarshal ]; value = builtins.toJSON value; passAsFile = [ "value" ]; + preferLocalBuild = true; } '' json2toml "$valuePath" "$out" '') {}; @@ -467,6 +470,7 @@ rec { value = toConf value; passAsFile = [ "value" ]; nativeBuildInputs = [ elixir ]; + preferLocalBuild = true; } '' cp "$valuePath" "$out" mix format "$out" @@ -501,6 +505,7 @@ rec { print(f"{key} = {repr(value)}") ''; passAsFile = [ "value" "pythonGen" ]; + preferLocalBuild = true; } '' cat "$valuePath" python3 "$pythonGenPath" > $out diff --git a/pkgs/pkgs-lib/formats/hocon/default.nix b/pkgs/pkgs-lib/formats/hocon/default.nix index 0ae9c569ed2b1..d7ff1e85bda63 100644 --- a/pkgs/pkgs-lib/formats/hocon/default.nix +++ b/pkgs/pkgs-lib/formats/hocon/default.nix @@ -153,6 +153,7 @@ in inherit name; dontUnpack = true; + preferLocalBuild = true; json = builtins.toJSON finalValue; passAsFile = [ "json" ]; diff --git a/pkgs/pkgs-lib/formats/libconfig/default.nix b/pkgs/pkgs-lib/formats/libconfig/default.nix index 7433a72853533..5687ab8c00578 100644 --- a/pkgs/pkgs-lib/formats/libconfig/default.nix +++ b/pkgs/pkgs-lib/formats/libconfig/default.nix @@ -85,6 +85,7 @@ in inherit name; dontUnpack = true; + preferLocalBuild = true; json = builtins.toJSON value; passAsFile = [ "json" ]; |