aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/compilers/ghc')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.1.nix1
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.2-binary.nix70
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.2.nix17
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix23
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix7
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.2.nix1
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.3.nix1
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix7
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/9.0.1.nix1
9 files changed, 102 insertions, 26 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.1.nix b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.1.nix
index d3835d01e5a2..42eb994b8fe2 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.1.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.1.nix
@@ -246,6 +246,7 @@ stdenv.mkDerivation (rec {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+ timeout = 24 * 3600;
inherit (ghc.meta) license platforms;
};
diff --git a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.2-binary.nix b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.2-binary.nix
index baa1d879b53e..1a1a9ca0160e 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.2-binary.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.2-binary.nix
@@ -2,6 +2,12 @@
, fetchurl, perl, gcc
, ncurses6, gmp, glibc, libiconv, numactl
, llvmPackages
+
+ # minimal = true; will remove files that aren't strictly necessary for
+ # regular builds and GHC bootstrapping.
+ # This is "useful" for staying within hydra's output limits for at least the
+ # aarch64-linux architecture.
+, minimal ? false
}:
# Prebuilt only does native
@@ -82,7 +88,6 @@ stdenv.mkDerivation rec {
patchShebangs ghc-${version}/utils/
patchShebangs ghc-${version}/configure
'' +
-
# We have to patch the GMP paths for the integer-gmp package.
''
find . -name integer-gmp.buildinfo \
@@ -91,6 +96,12 @@ stdenv.mkDerivation rec {
find . -name base.buildinfo \
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
'' +
+ # aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
+ # FFI_LIB_DIR is a good indication of places it must be needed.
+ stdenv.lib.optionalString stdenv.hostPlatform.isAarch64 ''
+ find . -name package.conf.in \
+ -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
+ '' +
# Rename needed libraries and binaries, fix interpreter
stdenv.lib.optionalString stdenv.isLinux ''
find . -type f -perm -0100 -exec patchelf \
@@ -128,14 +139,35 @@ stdenv.mkDerivation rec {
# On Linux, use patchelf to modify the executables so that they can
# find editline/gmp.
- postFixup = stdenv.lib.optionalString stdenv.isLinux ''
- for p in $(find "$out" -type f -executable); do
- if isELF "$p"; then
- echo "Patchelfing $p"
- patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
- fi
- done
- '' + stdenv.lib.optionalString stdenv.isDarwin ''
+ postFixup = stdenv.lib.optionalString stdenv.isLinux
+ (if stdenv.hostPlatform.isAarch64 then
+ # Keep rpath as small as possible on aarch64 for patchelf#244. All Elfs
+ # are 2 directories deep from $out/lib, so pooling symlinks there makes
+ # a short rpath.
+ ''
+ (cd $out/lib; ln -s ${ncurses6.out}/lib/libtinfo.so.6)
+ (cd $out/lib; ln -s ${gmp.out}/lib/libgmp.so.10)
+ (cd $out/lib; ln -s ${numactl.out}/lib/libnuma.so.1)
+ for p in $(find "$out/lib" -type f -name "*\.so*"); do
+ (cd $out/lib; ln -s $p)
+ done
+
+ for p in $(find "$out/lib" -type f -executable); do
+ if isELF "$p"; then
+ echo "Patchelfing $p"
+ patchelf --set-rpath "\$ORIGIN:\$ORIGIN/../.." $p
+ fi
+ done
+ ''
+ else
+ ''
+ for p in $(find "$out" -type f -executable); do
+ if isELF "$p"; then
+ echo "Patchelfing $p"
+ patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
+ fi
+ done
+ '') + stdenv.lib.optionalString stdenv.isDarwin ''
# not enough room in the object files for the full path to libiconv :(
for exe in $(find "$out" -type f -executable); do
isScript $exe && continue
@@ -146,6 +178,17 @@ stdenv.mkDerivation rec {
for file in $(find "$out" -name setup-config); do
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
done
+ '' +
+ stdenv.lib.optionalString minimal ''
+ # Remove profiling files
+ find $out -type f -name '*.p_o' -delete
+ find $out -type f -name '*.p_hi' -delete
+ find $out -type f -name '*_p.a' -delete
+ rm $out/lib/ghc-*/bin/ghc-iserv-prof
+ # Hydra will redistribute this derivation, so we have to keep the docs for
+ # legal reasons (retaining the legal notices etc)
+ # As a last resort we could unpack the docs separately and symlink them in.
+ # They're in $out/share/{doc,man}.
'';
doInstallCheck = true;
@@ -169,6 +212,11 @@ stdenv.mkDerivation rec {
enableShared = true;
};
- meta.license = stdenv.lib.licenses.bsd3;
- meta.platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
+ meta = {
+ homepage = "http://haskell.org/ghc";
+ description = "The Glasgow Haskell Compiler";
+ license = stdenv.lib.licenses.bsd3;
+ platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
+ maintainers = with stdenv.lib.maintainers; [ lostnet ];
+ };
}
diff --git a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.2.nix b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.2.nix
index f3d64ced81ee..fac12099d5db 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.2.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.10.2.nix
@@ -2,7 +2,7 @@
# build-tools
, bootPkgs
-, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx
+, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
, bash
, libiconv ? null, ncurses
@@ -107,9 +107,15 @@ stdenv.mkDerivation (rec {
outputs = [ "out" "doc" ];
- # https://gitlab.haskell.org/ghc/ghc/-/issues/18549
- patches = [
- ./issue-18549.patch
+ # https://gitlab.haskell.org/ghc/ghc/-/issues/18549
+ patches = [
+ ./issue-18549.patch
+ ] ++ stdenv.lib.optionals stdenv.isDarwin [
+ # Make Block.h compile with c++ compilers. Remove with the next release
+ (fetchpatch {
+ url = "https://gitlab.haskell.org/ghc/ghc/-/commit/97d0b0a367e4c6a52a17c3299439ac7de129da24.patch";
+ sha256 = "0r4zjj0bv1x1m2dgxp3adsf2xkr94fjnyj1igsivd9ilbs5ja0b5";
+ })
];
postPatch = "patchShebangs .";
@@ -190,7 +196,7 @@ stdenv.mkDerivation (rec {
strictDeps = true;
# Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
- dontAddExtraLibs = true;
+ dontAddExtraLibs = true;
nativeBuildInputs = [
perl autoconf automake m4 python3 sphinx
@@ -242,6 +248,7 @@ stdenv.mkDerivation (rec {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+ timeout = 24 * 3600;
inherit (ghc.meta) license platforms;
};
diff --git a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix
index 41af279e83ff..9234e3b14571 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix
@@ -1,6 +1,6 @@
{ stdenv
, fetchurl, perl, gcc
-, ncurses5, gmp, glibc, libiconv
+, ncurses5, ncurses6, gmp, glibc, libiconv
, llvmPackages
}:
@@ -10,8 +10,12 @@ assert stdenv.targetPlatform == stdenv.hostPlatform;
let
useLLVM = !stdenv.targetPlatform.isx86;
+ useNcurses6 = stdenv.hostPlatform.system == "x86_64-linux";
+
+ ourNcurses = if useNcurses6 then ncurses6 else ncurses5;
+
libPath = stdenv.lib.makeLibraryPath ([
- ncurses5 gmp
+ ourNcurses gmp
] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY"
@@ -34,12 +38,16 @@ stdenv.mkDerivation rec {
# https://downloads.haskell.org/~ghc/8.6.5/
src = fetchurl ({
i686-linux = {
+ # Don't use the Fedora27 build (as below) because there isn't one!
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-deb9-linux.tar.xz";
sha256 = "1p2h29qghql19ajk755xa0yxkn85slbds8m9n5196ris743vkp8w";
};
x86_64-linux = {
- url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-deb9-linux.tar.xz";
- sha256 = "1pqlx6rdjs2110g0y1i9f8x18lmdizibjqd15f5xahcz39hgaxdw";
+ # This is the Fedora build because it links against ncurses6 where the
+ # deb9 one links against ncurses5, see here
+ # https://github.com/NixOS/nixpkgs/issues/85924 for a discussion
+ url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-fedora27-linux.tar.xz";
+ sha256 = "18dlqm5d028fqh6ghzn7pgjspr5smw030jjzl3kq6q1kmwzbay6g";
};
aarch64-linux = {
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-aarch64-ubuntu18.04-linux.tar.xz";
@@ -88,9 +96,12 @@ stdenv.mkDerivation rec {
'' +
# Rename needed libraries and binaries, fix interpreter
stdenv.lib.optionalString stdenv.isLinux ''
- find . -type f -perm -0100 -exec patchelf \
+ 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 \
+ ${ # This isn't required for x86_64-linux where we use ncurses6
+ stdenv.lib.optionalString (!useNcurses6) "--replace-needed libtinfo.so libtinfo.so.5"
+ } \
--interpreter ${glibcDynLinker} {} \;
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
diff --git a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix
index a5d2bb5c88d6..7adacff597ca 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix
@@ -110,10 +110,10 @@ stdenv.mkDerivation (rec {
outputs = [ "out" "doc" ];
patches = [
- (fetchpatch rec { # https://phabricator.haskell.org/D5123
- url = "http://tarballs.nixos.org/sha256/${sha256}";
+ (fetchpatch { # https://phabricator.haskell.org/D5123
+ url = "https://gitlab.haskell.org/ghc/ghc/-/commit/13ff0b7ced097286e0d7b054f050871effe07f86.diff";
name = "D5123.diff";
- sha256 = "0nhqwdamf2y4gbwqxcgjxs0kqx23w9gv5kj0zv6450dq19rji82n";
+ sha256 = "140lmnqxra7xkwy370c5pyf8dgdwgmbpcrs1dapnwr2dh8bavn8c";
})
(fetchpatch { # https://github.com/haskell/haddock/issues/900
url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/983.diff";
@@ -256,6 +256,7 @@ stdenv.mkDerivation (rec {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+ timeout = 24 * 3600;
inherit (ghc.meta) license platforms;
};
diff --git a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.2.nix b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.2.nix
index 371a369496ee..fbb75637df65 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.2.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.2.nix
@@ -241,6 +241,7 @@ stdenv.mkDerivation (rec {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+ timeout = 24 * 3600;
inherit (ghc.meta) license platforms;
};
diff --git a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.3.nix b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.3.nix
index e26eacca204b..538655a0d056 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.3.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.3.nix
@@ -246,6 +246,7 @@ stdenv.mkDerivation (rec {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+ timeout = 24 * 3600;
inherit (ghc.meta) license platforms;
};
diff --git a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix
index 22a9e6e25f9f..e69766bccdaa 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/8.8.4.nix
@@ -119,7 +119,11 @@ stdenv.mkDerivation (rec {
postPatch = "patchShebangs .";
# GHC is a bit confused on its cross terminology.
- preConfigure = ''
+ preConfigure = stdenv.lib.optionalString stdenv.isAarch64 ''
+ # Aarch64 allow backward bootstrapping since earlier versions are unstable.
+ find . -name \*\.cabal\* -exec sed -i -e 's/\(base.*\)4.14/\14.16/' {} \; \
+ -exec sed -i -e 's/\(prim.*\)0.6/\10.8/' {} \;
+ '' + ''
for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
export "''${env#TARGET_}=''${!env}"
done
@@ -246,6 +250,7 @@ stdenv.mkDerivation (rec {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+ timeout = 24 * 3600;
inherit (ghc.meta) license platforms;
};
diff --git a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/9.0.1.nix b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/9.0.1.nix
index 23daee56a75f..bdb1a7555c21 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/9.0.1.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/compilers/ghc/9.0.1.nix
@@ -237,6 +237,7 @@ stdenv.mkDerivation (rec {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+ timeout = 24 * 3600;
inherit (ghc.meta) license platforms;
};