1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00

Use preferLocalBuild with runCommand

This commit is contained in:
Robert Helgesson 2018-11-14 20:59:45 +01:00
parent f4ebbcbf70
commit 0efda9cd6b
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 23 additions and 12 deletions

View file

@ -6,7 +6,13 @@ let
cfg = config.programs.direnv;
configFile = config:
pkgs.runCommand "config.toml" { buildInputs = [ pkgs.remarshal ]; } ''
pkgs.runCommand "config.toml"
{
buildInputs = [ pkgs.remarshal ];
preferLocalBuild = true;
allowSubstitutes = false;
}
''
remarshal -if json -of toml \
< ${pkgs.writeText "config.json" (builtins.toJSON config)} \
> $out

View file

@ -12,7 +12,12 @@ let
pluginDirs = map (pkg: "${pkg}/share/obs/obs-plugins") packages;
plugins = concatMapStringsSep " " (p: "${p}/*") pluginDirs;
in
pkgs.runCommand "obs-studio-plugins" {} ''
pkgs.runCommand "obs-studio-plugins"
{
preferLocalBuild = true;
allowSubstitutes = false;
}
''
mkdir $out
[[ '${plugins}' ]] || exit 0
for plugin in ${plugins}; do