Merge pull request #33358 from obsidiansystems/cross-haskell-samehash

haskell infra, ghc: Start to fix cross compilation without changing hashes
This commit is contained in:
Peter Simons
2018-01-03 11:49:49 +01:00
committed by GitHub
21 changed files with 258 additions and 139 deletions

View File

@@ -2,8 +2,7 @@
{ haskellPackages, src, deps ? p : [], name }: let
inherit (haskellPackages) ghc ghcWithPackages;
with-env = ghcWithPackages deps;
crossPrefix = if (ghc.cross or null) != null then "${ghc.cross.config}-" else "";
ghcName = "${crossPrefix}ghc";
ghcName = "${ghc.targetPrefix}ghc";
in runCommand name { buildInputs = [ with-env cctools ]; } ''
mkdir -p $out/lib
mkdir -p $out/include