system: use preferLocalBuild for simple derivations
Most of the builds like system.build.etc will be faster when built locally, they also don't depend on CC.
This commit is contained in:
parent
b761ee79a3
commit
dc33fe3d89
3 changed files with 46 additions and 40 deletions
|
|
@ -31,12 +31,14 @@ in
|
|||
|
||||
config = {
|
||||
|
||||
system.build.etc = pkgs.runCommand "etc" {} ''
|
||||
mkdir -p $out/etc
|
||||
cd $out/etc
|
||||
${concatMapStringsSep "\n" (attr: "mkdir -p $(dirname '${attr.target}')") etc}
|
||||
${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") etc}
|
||||
'';
|
||||
system.build.etc = pkgs.runCommandNoCC "etc"
|
||||
{ preferLocalBuild = true; }
|
||||
''
|
||||
mkdir -p $out/etc
|
||||
cd $out/etc
|
||||
${concatMapStringsSep "\n" (attr: "mkdir -p $(dirname '${attr.target}')") etc}
|
||||
${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") etc}
|
||||
'';
|
||||
|
||||
system.activationScripts.etc.text = ''
|
||||
# Set up the statically computed bits of /etc.
|
||||
|
|
|
|||
|
|
@ -84,15 +84,17 @@ in
|
|||
|
||||
config = {
|
||||
|
||||
system.build.launchd = pkgs.runCommand "launchd" {} ''
|
||||
mkdir -p $out/Library/LaunchAgents $out/Library/LaunchDaemons $out/user/Library/LaunchAgents
|
||||
cd $out/Library/LaunchAgents
|
||||
${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") launchAgents}
|
||||
cd $out/Library/LaunchDaemons
|
||||
${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") launchDaemons}
|
||||
cd $out/user/Library/LaunchAgents
|
||||
${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") userLaunchAgents}
|
||||
'';
|
||||
system.build.launchd = pkgs.runCommandNoCC "launchd"
|
||||
{ preferLocalBuild = true; }
|
||||
''
|
||||
mkdir -p $out/Library/LaunchAgents $out/Library/LaunchDaemons $out/user/Library/LaunchAgents
|
||||
cd $out/Library/LaunchAgents
|
||||
${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") launchAgents}
|
||||
cd $out/Library/LaunchDaemons
|
||||
${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") launchDaemons}
|
||||
cd $out/user/Library/LaunchAgents
|
||||
${concatMapStringsSep "\n" (attr: "ln -s '${attr.source}' '${attr.target}'") userLaunchAgents}
|
||||
'';
|
||||
|
||||
system.activationScripts.launchd.text = ''
|
||||
# Set up launchd services in /Library/LaunchAgents and /Library/LaunchDaemons
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue