nixos: add preferLocalBuild=true; on derivations for config files

This commit is contained in:
Symphorien Gibol
2019-02-22 20:11:27 +01:00
committed by nix-review
parent 2a81eceeba
commit a915b33315
56 changed files with 99 additions and 60 deletions
@@ -24,7 +24,7 @@ let
EOF
chmod 755 $out/${name}
'';
in pkgs.runCommand "buildkite-agent-hooks" {} ''
in pkgs.runCommand "buildkite-agent-hooks" { preferLocalBuild = true; } ''
mkdir $out
${concatStringsSep "\n" (mapAttrsToList mkHookEntry (filterAttrs (n: v: v != null) cfg.hooks))}
'';
@@ -8,6 +8,7 @@ let
if (cfg.configFile == null) then
(pkgs.runCommand "config.toml" {
buildInputs = [ pkgs.remarshal ];
preferLocalBuild = true;
} ''
remarshal -if json -of toml \
< ${pkgs.writeText "config.json" (builtins.toJSON cfg.configOptions)} \