mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 02:39:48 +01:00
Use preferLocalBuild
with runCommand
This commit is contained in:
parent
f4ebbcbf70
commit
0efda9cd6b
2 changed files with 23 additions and 12 deletions
|
@ -6,11 +6,17 @@ let
|
|||
|
||||
cfg = config.programs.direnv;
|
||||
configFile = config:
|
||||
pkgs.runCommand "config.toml" { buildInputs = [ pkgs.remarshal ]; } ''
|
||||
remarshal -if json -of toml \
|
||||
< ${pkgs.writeText "config.json" (builtins.toJSON config)} \
|
||||
> $out
|
||||
'';
|
||||
pkgs.runCommand "config.toml"
|
||||
{
|
||||
buildInputs = [ pkgs.remarshal ];
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
}
|
||||
''
|
||||
remarshal -if json -of toml \
|
||||
< ${pkgs.writeText "config.json" (builtins.toJSON config)} \
|
||||
> $out
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
|
|
|
@ -12,13 +12,18 @@ let
|
|||
pluginDirs = map (pkg: "${pkg}/share/obs/obs-plugins") packages;
|
||||
plugins = concatMapStringsSep " " (p: "${p}/*") pluginDirs;
|
||||
in
|
||||
pkgs.runCommand "obs-studio-plugins" {} ''
|
||||
mkdir $out
|
||||
[[ '${plugins}' ]] || exit 0
|
||||
for plugin in ${plugins}; do
|
||||
ln -s "$plugin" $out/
|
||||
done
|
||||
'';
|
||||
pkgs.runCommand "obs-studio-plugins"
|
||||
{
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
}
|
||||
''
|
||||
mkdir $out
|
||||
[[ '${plugins}' ]] || exit 0
|
||||
for plugin in ${plugins}; do
|
||||
ln -s "$plugin" $out/
|
||||
done
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
|
|
Loading…
Reference in a new issue