on iko/ghcjs-patch-master help sign in
shellFor: provide CABAL_CONFIG in shell
commitb3b41333ca89e80217b043736723617ede347c46 authorRodney Lorrimar <rodney.lorrimar@iohk.io> dateMon 20 May 2019, 10:01 (7 years ago) parentbfa5b37
2 files changed+15−12
builder/default.nix+1 builder/shell-for.nix+14−12
builder/default.nix+1
@@ -30,5 +30,6 @@ in {
3030 # Same as haskellPackages.shellFor in nixpkgs.
3131 shellFor = haskellLib.weakCallPackage pkgs ./shell-for.nix {
3232 inherit hsPkgs ghcForComponent makeConfigFiles;
33+ inherit (buildPackages) glibcLocales;
3334 };
3435}
builder/shell-for.nix+14−12
@@ -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 })