Set ‘allowSubstitutes = false’ on various derivations
This reduces the number of binary cache requests. See
b64988bb35
.
This commit is contained in:
parent
4d49006a0f
commit
dc62669335
|
@ -28,7 +28,10 @@ let
|
||||||
# Perform substitutions in all udev rules files.
|
# Perform substitutions in all udev rules files.
|
||||||
udevRules = stdenv.mkDerivation {
|
udevRules = stdenv.mkDerivation {
|
||||||
name = "udev-rules";
|
name = "udev-rules";
|
||||||
|
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
|
@ -12,7 +12,10 @@ let
|
||||||
|
|
||||||
configDir = pkgs.stdenv.mkDerivation {
|
configDir = pkgs.stdenv.mkDerivation {
|
||||||
name = "dbus-conf";
|
name = "dbus-conf";
|
||||||
|
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,7 @@ let
|
||||||
if [] == failed then pkgs.stdenv.mkDerivation {
|
if [] == failed then pkgs.stdenv.mkDerivation {
|
||||||
name = "nixos-${config.system.nixosVersion}";
|
name = "nixos-${config.system.nixosVersion}";
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
buildCommand = systemBuilder;
|
buildCommand = systemBuilder;
|
||||||
|
|
||||||
inherit (pkgs) utillinux coreutils;
|
inherit (pkgs) utillinux coreutils;
|
||||||
|
|
|
@ -13,13 +13,20 @@ rec {
|
||||||
pathSafeName = lib.replaceChars ["@" ":" "\\"] ["-" "-" "-"] name;
|
pathSafeName = lib.replaceChars ["@" ":" "\\"] ["-" "-" "-"] name;
|
||||||
in
|
in
|
||||||
if unit.enable then
|
if unit.enable then
|
||||||
pkgs.runCommand "unit-${pathSafeName}" { preferLocalBuild = true; inherit (unit) text; }
|
pkgs.runCommand "unit-${pathSafeName}"
|
||||||
|
{ preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
|
inherit (unit) text;
|
||||||
|
}
|
||||||
''
|
''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
echo -n "$text" > $out/${shellEscape name}
|
echo -n "$text" > $out/${shellEscape name}
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
pkgs.runCommand "unit-${pathSafeName}-disabled" { preferLocalBuild = true; }
|
pkgs.runCommand "unit-${pathSafeName}-disabled"
|
||||||
|
{ preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
|
}
|
||||||
''
|
''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
ln -s /dev/null $out/${shellEscape name}
|
ln -s /dev/null $out/${shellEscape name}
|
||||||
|
@ -89,7 +96,10 @@ rec {
|
||||||
as));
|
as));
|
||||||
|
|
||||||
generateUnits = type: units: upstreamUnits: upstreamWants:
|
generateUnits = type: units: upstreamUnits: upstreamWants:
|
||||||
pkgs.runCommand "${type}-units" { preferLocalBuild = true; } ''
|
pkgs.runCommand "${type}-units"
|
||||||
|
{ preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
|
} ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
|
|
||||||
# Copy the upstream systemd units we're interested in.
|
# Copy the upstream systemd units we're interested in.
|
||||||
|
|
|
@ -14,6 +14,7 @@ let
|
||||||
builder = ./make-etc.sh;
|
builder = ./make-etc.sh;
|
||||||
|
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
|
|
||||||
/* !!! Use toXML. */
|
/* !!! Use toXML. */
|
||||||
sources = map (x: x.source) etc';
|
sources = map (x: x.source) etc';
|
||||||
|
|
|
@ -23,6 +23,7 @@ rec {
|
||||||
passAsFile = [ "text" ];
|
passAsFile = [ "text" ];
|
||||||
# Pointless to do this on a remote machine.
|
# Pointless to do this on a remote machine.
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
allowSubstitutes = false;
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
n=$out${destination}
|
n=$out${destination}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user