summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-10-02 00:33:30 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-10-02 00:33:30 -0400
commit4f5d9996a628e44695657f9a8f860a5f111acab3 (patch)
treef6fe4fa5f93fd7042b8a5cdcb65a64e6a9af7f7b /pkgs/development/compilers/ghc
parentb19113380f0de343e4b18ae06ef5fd64681caa55 (diff)
downloadnixlib-4f5d9996a628e44695657f9a8f860a5f111acab3.tar
nixlib-4f5d9996a628e44695657f9a8f860a5f111acab3.tar.gz
nixlib-4f5d9996a628e44695657f9a8f860a5f111acab3.tar.bz2
nixlib-4f5d9996a628e44695657f9a8f860a5f111acab3.tar.lz
nixlib-4f5d9996a628e44695657f9a8f860a5f111acab3.tar.xz
nixlib-4f5d9996a628e44695657f9a8f860a5f111acab3.tar.zst
nixlib-4f5d9996a628e44695657f9a8f860a5f111acab3.zip
ghc-8.2.2: Fix which hsc2hs is installed on cross
These commits all ended up on later GHCs, and are already being patched
in for ghc-8.4.3 in nixpkgs.
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r--pkgs/development/compilers/ghc/8.2.2.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/8.2.2.nix b/pkgs/development/compilers/ghc/8.2.2.nix
index caf5b941f7c0..b1c615f1ce28 100644
--- a/pkgs/development/compilers/ghc/8.2.2.nix
+++ b/pkgs/development/compilers/ghc/8.2.2.nix
@@ -98,6 +98,35 @@ stdenv.mkDerivation (rec {
       sha256 = "03253ci40np1v6k0wmi4aypj3nmj3rdyvb1k6rwqipb30nfc719f";
     })
     (import ./abi-depends-determinism.nix { inherit fetchpatch runCommand; })
+  ] ++ stdenv.lib.optionals (hostPlatform != targetPlatform) [
+    # Cherry-pick a few commits from newer hsc2hs so that proper binary is
+    # installed -- stage 2 normally but stage 1 with cross.
+    #
+    # TODO make unconditional next mass rebuild.
+    (fetchpatch {
+      url = "https://git.haskell.org/hsc2hs.git/patch/ecdac062b5cf1d284906487849c56f4e149b3c8e";
+      sha256 = "1gagswi26j50z44sdx0mk1sb3wr0nrqyaph9j724zp6iwqslxyzm";
+      extraPrefix = "utils/hsc2hs/";
+      stripLen = 1;
+    })
+    (fetchpatch {
+      url = "https://git.haskell.org/hsc2hs.git/patch/d1e191766742e9166a90656c94a7cf3bd73444df";
+      sha256 = "0q25n0k0sbgji6qvalx5j3lmw80j2k0d2k87k4v4y7xqc4ihpi12";
+      extraPrefix = "utils/hsc2hs/";
+      stripLen = 1;
+    })
+    (fetchpatch {
+      url = "https://git.haskell.org/hsc2hs.git/patch/9483ad10064fbbb97ab525280623826b1ef63959";
+      sha256 = "1cpfdhfc0cz9xkjzkcgwx4fbyj96dkmd04wpwi1vji7fahw8kmf3";
+      extraPrefix = "utils/hsc2hs/";
+      stripLen = 1;
+    })
+    (fetchpatch {
+      url = "https://git.haskell.org/hsc2hs.git/patch/738f3666c878ee9e79c3d5e819ef8b3460288edf";
+      sha256 = "0plzsbfaq6vb1023lsarrjglwgr9chld4q3m99rcfzx0yx5mibp3";
+      extraPrefix = "utils/hsc2hs/";
+      stripLen = 1;
+    })
   ] ++ stdenv.lib.optionals (hostPlatform != targetPlatform && targetPlatform.system == hostPlatform.system) [
     (fetchpatch {
       url = "https://raw.githubusercontent.com/gentoo/gentoo/08a41d2dff99645af6ac5a7bb4774f5f193b6f20/dev-lang/ghc/files/ghc-8.2.1_rc1-unphased-cross.patch";