summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorAndrew Childs <lorne@cons.org.nz>2020-03-18 19:16:52 +0900
committerPeter Simons <simons@cryp.to>2020-03-27 20:56:52 +0100
commit5180ec3506133665e49e7ac42274d677c1705d36 (patch)
tree2fc11f2fe8d5a8fe600353090651db895cfc81fe /pkgs/development/compilers
parentf6d2dce2bf911f76abb2407a65a654da84c82800 (diff)
downloadnixpkgs-5180ec3506133665e49e7ac42274d677c1705d36.tar
nixpkgs-5180ec3506133665e49e7ac42274d677c1705d36.tar.gz
nixpkgs-5180ec3506133665e49e7ac42274d677c1705d36.tar.bz2
nixpkgs-5180ec3506133665e49e7ac42274d677c1705d36.tar.lz
nixpkgs-5180ec3506133665e49e7ac42274d677c1705d36.tar.xz
nixpkgs-5180ec3506133665e49e7ac42274d677c1705d36.tar.zst
nixpkgs-5180ec3506133665e49e7ac42274d677c1705d36.zip
ghc865Binary: aarch64 support
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/ghc/8.6.5-binary.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/development/compilers/ghc/8.6.5-binary.nix b/pkgs/development/compilers/ghc/8.6.5-binary.nix
index dcce7f80281..97793d91289 100644
--- a/pkgs/development/compilers/ghc/8.6.5-binary.nix
+++ b/pkgs/development/compilers/ghc/8.6.5-binary.nix
@@ -1,12 +1,15 @@
 { stdenv
 , fetchurl, perl, gcc
 , ncurses5, gmp, glibc, libiconv
+, llvmPackages
 }:
 
 # Prebuilt only does native
 assert stdenv.targetPlatform == stdenv.hostPlatform;
 
 let
+  useLLVM = !stdenv.targetPlatform.isx86;
+
   libPath = stdenv.lib.makeLibraryPath ([
     ncurses5 gmp
   ] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
@@ -38,6 +41,10 @@ stdenv.mkDerivation rec {
       url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-deb9-linux.tar.xz";
       sha256 = "1pqlx6rdjs2110g0y1i9f8x18lmdizibjqd15f5xahcz39hgaxdw";
     };
+    aarch64-linux = {
+      url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-aarch64-ubuntu18.04-linux.tar.xz";
+      sha256 = "11n7l2a36i5vxzzp85la2555q4m34l747g0pnmd81cp46y85hlhq";
+    };
     x86_64-darwin = {
       url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
       sha256 = "0s9188vhhgf23q3rjarwhbr524z6h2qga5xaaa2pma03sfqvvhfz";
@@ -46,6 +53,7 @@ stdenv.mkDerivation rec {
     or (throw "cannot bootstrap GHC on this platform"));
 
   nativeBuildInputs = [ perl ];
+  propagatedBuildInputs = stdenv.lib.optionals useLLVM [ llvmPackages.llvm ];
 
   # Cannot patchelf beforehand due to relative RPATHs that anticipate
   # the final install location/
@@ -169,5 +177,5 @@ stdenv.mkDerivation rec {
   };
 
   meta.license = stdenv.lib.licenses.bsd3;
-  meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"];
+  meta.platforms = ["x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
 }