Last active
September 24, 2020 10:34
-
-
Save sorki/88930e984b5ca5fa427da87c25933bbb to your computer and use it in GitHub Desktop.
diff -u pkgs/development/compilers/ghc/8.6.5-binary.nix pkgs/development/compilers/ghc/8.10.2-binary.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- pkgs/development/compilers/ghc/8.6.5-binary.nix 2020-09-08 09:38:38.112547979 +0200 | |
+++ pkgs/development/compilers/ghc/8.10.2-binary.nix 2020-09-24 12:26:35.216890173 +0200 | |
@@ -1,6 +1,6 @@ | |
{ stdenv | |
, fetchurl, perl, gcc | |
-, ncurses5, gmp, glibc, libiconv | |
+, ncurses6, gmp, glibc, libiconv | |
, llvmPackages | |
}: | |
@@ -11,7 +11,7 @@ | |
useLLVM = !stdenv.targetPlatform.isx86; | |
libPath = stdenv.lib.makeLibraryPath ([ | |
- ncurses5 gmp | |
+ ncurses6 gmp | |
] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv); | |
libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY" | |
@@ -27,27 +27,31 @@ | |
in | |
stdenv.mkDerivation rec { | |
- version = "8.6.5"; | |
+ version = "8.10.2"; | |
name = "ghc-${version}-binary"; | |
- # https://downloads.haskell.org/~ghc/8.6.5/ | |
+ # https://downloads.haskell.org/~ghc/8.10.2/ | |
src = fetchurl ({ | |
i686-linux = { | |
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-deb9-linux.tar.xz"; | |
- sha256 = "1p2h29qghql19ajk755xa0yxkn85slbds8m9n5196ris743vkp8w"; | |
+ sha256 = "0bvwisl4w0z5z8z0da10m9sv0mhm9na2qm43qxr8zl23mn32mblx"; | |
}; | |
x86_64-linux = { | |
- url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-deb9-linux.tar.xz"; | |
- sha256 = "1pqlx6rdjs2110g0y1i9f8x18lmdizibjqd15f5xahcz39hgaxdw"; | |
+ url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-deb10-linux.tar.xz"; | |
+ sha256 = "0chnzy9j23b2wa8clx5arwz8wnjfxyjmz9qkj548z14cqf13slcl"; | |
+ }; | |
+ armv7l-linux = { | |
+ url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-armv7-deb10-linux.tar.xz"; | |
+ sha256 = "1j41cq5d3rmlgz7hzw8f908fs79gc5mn3q5wz277lk8zdf19g75v"; | |
}; | |
aarch64-linux = { | |
- url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-aarch64-ubuntu18.04-linux.tar.xz"; | |
- sha256 = "11n7l2a36i5vxzzp85la2555q4m34l747g0pnmd81cp46y85hlhq"; | |
+ url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz"; | |
+ sha256 = "14smwl3741ixnbgi0l51a7kh7xjkiannfqx15b72svky0y4l3wjw"; | |
}; | |
x86_64-darwin = { | |
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz"; | |
- sha256 = "0s9188vhhgf23q3rjarwhbr524z6h2qga5xaaa2pma03sfqvvhfz"; | |
+ sha256 = "1hngyq14l4f950hzhh2d204ca2gfc98pc9xdasxihzqd1jq75dzd"; | |
}; | |
}.${stdenv.hostPlatform.system} | |
or (throw "cannot bootstrap GHC on this platform")); | |
@@ -89,8 +93,7 @@ | |
# Rename needed libraries and binaries, fix interpreter | |
stdenv.lib.optionalString stdenv.isLinux '' | |
find . -type f -perm -0100 -exec patchelf \ | |
- --replace-needed libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \ | |
- --replace-needed libtinfo.so libtinfo.so.5 \ | |
+ --replace-needed libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.6 libncurses.so \ | |
--interpreter ${glibcDynLinker} {} \; | |
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2 | |
@@ -106,6 +109,11 @@ | |
find ./ghc-${version}/rts -name "libHSrts*.a" -exec ''${OBJCOPY:-objcopy} --redefine-sym __strdup=strdup {} \; | |
''; | |
+ # fix for `configure: error: Your linker is affected by binutils #16177` | |
+ preConfigure = stdenv.lib.optionalString | |
+ stdenv.targetPlatform.isAarch32 | |
+ "LD=ld.gold"; | |
+ | |
configurePlatforms = [ ]; | |
configureFlags = [ | |
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib" | |
@@ -161,5 +169,5 @@ | |
}; | |
meta.license = stdenv.lib.licenses.bsd3; | |
- meta.platforms = ["x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"]; | |
+ meta.platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment