haskell lib: Make Cabal compiler names explicit

Cabal2nix expects a --compiler flag that contains a Cabal Compiler description.
We used to use the compiler's derivation name for this, but this breaks when
cross-compiling due to the target suffix. Instead we add an explicit
haskellCompilerName attribute to Haskell compiler derivations.
This commit is contained in:
Ben Gamari
2017-12-24 12:31:37 -05:00
committed by John Ericson
parent b612597c3d
commit bf687907d7
16 changed files with 75 additions and 11 deletions

View File

@@ -120,7 +120,7 @@ let
installPhase = ''
export HOME="$TMP"
mkdir -p "$out"
cabal2nix --compiler=${self.ghc.name} --system=${stdenv.system} ${sha256Arg} "${src}" > "$out/default.nix"
cabal2nix --compiler=${ghc.haskellCompilerName} --system=${stdenv.system} ${sha256Arg} "${src}" > "$out/default.nix"
'';
};