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:
parent
f4ebbcbf70
commit
0efda9cd6b
2 changed files with 23 additions and 12 deletions
|
@ -6,11 +6,17 @@ let
|
||||||
|
|
||||||
cfg = config.programs.direnv;
|
cfg = config.programs.direnv;
|
||||||
configFile = config:
|
configFile = config:
|
||||||
pkgs.runCommand "config.toml" { buildInputs = [ pkgs.remarshal ]; } ''
|
pkgs.runCommand "config.toml"
|
||||||
remarshal -if json -of toml \
|
{
|
||||||
< ${pkgs.writeText "config.json" (builtins.toJSON config)} \
|
buildInputs = [ pkgs.remarshal ];
|
||||||
> $out
|
preferLocalBuild = true;
|
||||||
'';
|
allowSubstitutes = false;
|
||||||
|
}
|
||||||
|
''
|
||||||
|
remarshal -if json -of toml \
|
||||||
|
< ${pkgs.writeText "config.json" (builtins.toJSON config)} \
|
||||||
|
> $out
|
||||||
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
|
@ -12,13 +12,18 @@ let
|
||||||
pluginDirs = map (pkg: "${pkg}/share/obs/obs-plugins") packages;
|
pluginDirs = map (pkg: "${pkg}/share/obs/obs-plugins") packages;
|
||||||
plugins = concatMapStringsSep " " (p: "${p}/*") pluginDirs;
|
plugins = concatMapStringsSep " " (p: "${p}/*") pluginDirs;
|
||||||
in
|
in
|
||||||
pkgs.runCommand "obs-studio-plugins" {} ''
|
pkgs.runCommand "obs-studio-plugins"
|
||||||
mkdir $out
|
{
|
||||||
[[ '${plugins}' ]] || exit 0
|
preferLocalBuild = true;
|
||||||
for plugin in ${plugins}; do
|
allowSubstitutes = false;
|
||||||
ln -s "$plugin" $out/
|
}
|
||||||
done
|
''
|
||||||
'';
|
mkdir $out
|
||||||
|
[[ '${plugins}' ]] || exit 0
|
||||||
|
for plugin in ${plugins}; do
|
||||||
|
ln -s "$plugin" $out/
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue