Skip to content

Commit

Permalink
ghc865Binary: aarch64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
thefloweringash committed Mar 21, 2020
1 parent 2a826e4 commit 731b879
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkgs/development/compilers/ghc/8.6.5-binary.nix
Original file line number Diff line number Diff line change
@@ -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);
Expand Down Expand Up @@ -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";
Expand All @@ -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/
Expand Down Expand Up @@ -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"];
}

0 comments on commit 731b879

Please sign in to comment.