@@ -1,4 +1,4 @@
1−{ buildPackages, lib, stdenv, ghcForComponent, makeConfigFiles, hsPkgs }:
1+{ lib, stdenv, glibcLocales, ghcForComponent, makeConfigFiles, hsPkgs }:
22
33{ packages, withHoogle ? true, ... } @ args:
44
@@ -7,18 +7,19 @@ let
77 name = if lib.length selected == 1
88 then "ghc-shell-for-${(lib.head selected).name}"
99 else "ghc-shell-for-packages";
10+ configFiles = makeConfigFiles {
11+ fullName = args.name or name;
12+ identifier.name = name;
13+ component = {
14+ depends = selected;
15+ libs = [];
16+ frameworks = [];
17+ doExactConfig = false;
18+ };
19+ };
1020 ghcEnv = ghcForComponent {
1121 componentName = name;
12− configFiles = makeConfigFiles {
13− fullName = args.name or name;
14− identifier.name = name;
15− component = {
16− depends = selected;
17− libs = [];
18− frameworks = [];
19− doExactConfig = false;
20− };
21− };
22+ inherit configFiles;
2223 };
2324 mkDrvArgs = builtins.removeAttrs args ["packages" "withHoogle"];
2425
@@ -34,7 +35,8 @@ in
3435 phases = ["installPhase"];
3536 installPhase = "echo $nativeBuildInputs $buildInputs > $out";
3637 LANG = "en_US.UTF-8";
37− LOCALE_ARCHIVE = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "${buildPackages.glibcLocales}/lib/locale/locale-archive";
38+ LOCALE_ARCHIVE = lib.optionalString (stdenv.hostPlatform.libc == "glibc") "${glibcLocales}/lib/locale/locale-archive";
39+ CABAL_CONFIG = "${configFiles}/cabal.config";
3840
3941 passthru.ghc = ghcEnv;
4042 })