Unverified Commit f6c55314 authored by nicoo's avatar nicoo Committed by GitHub
Browse files

nixos: Don't set `!allowSubstitutes` (#314664)

It is set by `runCommandLocal` and prevents fetching the build output
from `cache.nixos.org` or another trusted substituter.
parent 380d334e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ let
    '';

  babelfishTranslate = path: name:
    pkgs.runCommandLocal "${name}.fish" {
    pkgs.runCommand "${name}.fish" {
      preferLocalBuild = true;
      nativeBuildInputs = [ pkgs.babelfish ];
    } "babelfish < ${path} > $out;";

@@ -258,12 +259,14 @@ in
            preferLocalBuild = true;
            allowSubstitutes = false;
          };
          generateCompletions = package: pkgs.runCommandLocal
          generateCompletions = package: pkgs.runCommand
            ( with lib.strings; let
                storeLength = stringLength storeDir + 34; # Nix' StorePath::HashLen + 2 for the separating slash and dash
                pathName = substring storeLength (stringLength package - storeLength) package;
              in (package.name or pathName) + "_fish-completions")
            ( { inherit package; } //
            ( { inherit package;
                preferLocalBuild = true;
              } //
              lib.optionalAttrs (package ? meta.priority) { meta.priority = package.meta.priority; })
            ''
              mkdir -p $out
+3 −3
Original line number Diff line number Diff line
@@ -321,9 +321,9 @@ in
    };

    ###### wrappers consistency checks
    system.checks = lib.singleton (pkgs.runCommandLocal
      "ensure-all-wrappers-paths-exist" { }
      ''
    system.checks = lib.singleton (pkgs.runCommand "ensure-all-wrappers-paths-exist" {
      preferLocalBuild = true;
    } ''
        # make sure we produce output
        mkdir -p $out

+3 −1
Original line number Diff line number Diff line
@@ -9,7 +9,9 @@ let
        ln --symbolic ${pkgs.writeShellApplication { inherit name text; }}/bin/${name} $out/${name}
      '';
    in
    pkgs.runCommandLocal "buildkite-agent-hooks" { } ''
    pkgs.runCommand "buildkite-agent-hooks" {
      preferLocalBuild = true;
    } ''
      mkdir $out
      ${lib.concatStringsSep "\n" (lib.mapAttrsToList mkHookEntry hooks)}
    '';
+3 −1
Original line number Diff line number Diff line
@@ -228,7 +228,9 @@ in

        preStart =
          let
            createBotsScript = pkgs.runCommandLocal "ASF-bots" { } ''
            createBotsScript = pkgs.runCommand "ASF-bots" {
              preferLocalBuild = true;
            } ''
              mkdir -p $out
              # clean potential removed bots
              rm -rf $out/*.json
+3 −1
Original line number Diff line number Diff line
@@ -43,7 +43,9 @@ let
  # secrets or includes, by naively unquoting strings with leading bangs
  # and at least one space-separated parameter.
  # https://www.home-assistant.io/docs/configuration/secrets/
  renderYAMLFile = fn: yaml: pkgs.runCommandLocal fn { } ''
  renderYAMLFile = fn: yaml: pkgs.runCommand fn {
    preferLocalBuilds = true;
  } ''
    cp ${format.generate fn yaml} $out
    sed -i -e "s/'\!\([a-z_]\+\) \(.*\)'/\!\1 \2/;s/^\!\!/\!/;" $out
  '';
Loading