@@ -1,4 +1,4 @@
1−{ buildPackages, lib, stdenv, ghcForComponent, makeConfigFiles, hsPkgs }:
1+{ lib, stdenv, glibcLocales, ghcForComponent, makeConfigFiles, hsPkgs }:
3{ packages, withHoogle ? true, ... } @ args:
3{ packages, withHoogle ? true, ... } @ args:
@@ -7,18 +7,19 @@ let
7 name = if lib.length selected == 1
7 name = if lib.length selected == 1
8 then "ghc-shell-for-${(lib.head selected).name}"
8 then "ghc-shell-for-${(lib.head selected).name}"
9 else "ghc-shell-for-packages";
9 else "ghc-shell-for-packages";
10+ configFiles = makeConfigFiles {
11+ fullName = args.name or name;
12+ identifier.name = name;
17+ doExactConfig = false;
10 ghcEnv = ghcForComponent {
20 ghcEnv = ghcForComponent {
11 componentName = name;
21 componentName = name;
12− configFiles = makeConfigFiles {
22+ inherit configFiles;
13− fullName = args.name or name;
14− identifier.name = name;
19− doExactConfig = false;
23 mkDrvArgs = builtins.removeAttrs args ["packages" "withHoogle"];
24 mkDrvArgs = builtins.removeAttrs args ["packages" "withHoogle"];
@@ -34,7 +35,8 @@ in
34 phases = ["installPhase"];
35 phases = ["installPhase"];
35 installPhase = "echo $nativeBuildInputs $buildInputs > $out";
36 installPhase = "echo $nativeBuildInputs $buildInputs > $out";
36 LANG = "en_US.UTF-8";
37 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";
39 passthru.ghc = ghcEnv;
41 passthru.ghc = ghcEnv;