haskellSrc2nix: disallow substitutes

Fix #49818. See the bug for more details.

The work done by haskellSrc2nix is usually lightweight, but needs to
be done each time a cabal file change. This triggers unexpected
network activity for a cache query which results most of the time on a
cache miss.

By disabling substitutes we:

- avoid the, mostly useless, binary cache query
- avoid unexpected network failure when users change a cabal file and
  try to rebuild without connectivity.
This commit is contained in:
Guillaume Bouchard 2018-11-06 15:17:07 +01:00 committed by Profpatsch
parent 73d7046362
commit 62882d8cd2

View File

@ -125,6 +125,7 @@ let
name = "cabal2nix-${name}";
nativeBuildInputs = [ pkgs.buildPackages.cabal2nix ];
preferLocalBuild = true;
allowSubstitutes = false;
phases = ["installPhase"];
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = pkgs.lib.optionalString (buildPlatform.libc == "glibc") "${buildPackages.glibcLocales}/lib/locale/locale-archive";