- ghc versions 6.10.4, 6.12.3, and 7.2.2 are broken, and 6.10.2-binary is no longer necessary after those versions have been dropped - halvm version 2.4.0 hasn't compiled in a long time - uhc version 1.1.9.4 hasn't compiled in a long timewip/yesman
parent
83b35508c6
commit
a45dfaa335
@ -1,112 +0,0 @@ |
||||
{ stdenv |
||||
, fetchurl, perl |
||||
, libedit, ncurses5, gmp |
||||
, enableIntegerSimple ? false |
||||
}: |
||||
|
||||
# Prebuilt only does native |
||||
assert stdenv.targetPlatform == stdenv.hostPlatform; |
||||
|
||||
stdenv.mkDerivation rec { |
||||
version = "6.10.2"; |
||||
|
||||
name = "ghc-${version}-binary"; |
||||
|
||||
src = fetchurl ({ |
||||
"i686-linux" = { |
||||
# This binary requires libedit.so.0 (rather than libedit.so.2). |
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2"; |
||||
sha256 = "1fw0zr2qshlpk8s0d16k27zcv5263nqdg2xds5ymw8ff6qz9rz9b"; |
||||
}; |
||||
"x86_64-linux" = { |
||||
# Idem. |
||||
url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2"; |
||||
sha256 = "1rd2j7lmcfsm2rdfb5g6q0l8dz3sxadk5m3d2f69d4a6g4p4h7jj"; |
||||
}; |
||||
}.${stdenv.hostPlatform.system} |
||||
or (throw "cannot bootstrap GHC on this platform")); |
||||
|
||||
nativeBuildInputs = [ perl ]; |
||||
|
||||
# Cannot patchelf beforehand due to relative RPATHs that anticipate |
||||
# the final install location/ |
||||
LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ libedit ncurses5 gmp ]; |
||||
|
||||
postUnpack = |
||||
# Strip is harmful, see also below. It's important that this happens |
||||
# first. The GHC Cabal build system makes use of strip by default and |
||||
# has hardcoded paths to /usr/bin/strip in many places. We replace |
||||
# those below, making them point to our dummy script. |
||||
'' |
||||
mkdir "$TMP/bin" |
||||
for i in strip; do |
||||
echo '#! ${stdenv.shell}' > "$TMP/bin/$i" |
||||
chmod +x "$TMP/bin/$i" |
||||
done |
||||
PATH="$TMP/bin:$PATH" |
||||
'' + |
||||
# On Linux, use patchelf to modify the executables so that they can |
||||
# find editline/gmp. |
||||
stdenv.lib.optionalString stdenv.hostPlatform.isLinux '' |
||||
find . -type f -perm -0100 -exec patchelf \ |
||||
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \; |
||||
|
||||
for prog in ld ar gcc strip ranlib; do |
||||
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \; |
||||
done |
||||
''; |
||||
|
||||
configurePlatforms = [ ]; |
||||
configureFlags = [ |
||||
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib" |
||||
"--with-gmp-includes=${stdenv.lib.getDev gmp}/include" |
||||
]; |
||||
|
||||
# Stripping combined with patchelf breaks the executables (they die |
||||
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85) |
||||
dontStrip = true; |
||||
|
||||
# No building is necessary, but calling make without flags ironically |
||||
# calls install-strip ... |
||||
dontBuild = true; |
||||
|
||||
postInstall = '' |
||||
# bah, the passing gmp doesn't work, so let's add it to the final package.conf in a quick but dirty way |
||||
sed -i "s@^\(.*pkgName = PackageName \"rts\".*\libraryDirs = \\[\)\(.*\)@\\1\"${gmp.out}/lib\",\2@" $out/lib/ghc-${version}/package.conf |
||||
''; |
||||
|
||||
# On Linux, use patchelf to modify the executables so that they can |
||||
# find editline/gmp. |
||||
preFixup = stdenv.lib.optionalString stdenv.isLinux '' |
||||
find "$out" -type f -executable \ |
||||
-exec patchelf --set-rpath "${LD_LIBRARY_PATH}" {} \; |
||||
''; |
||||
|
||||
doInstallCheck = true; |
||||
installCheckPhase = '' |
||||
# Sanity check, can ghc create executables? |
||||
cd $TMP |
||||
mkdir test-ghc; cd test-ghc |
||||
cat > main.hs << EOF |
||||
module Main where |
||||
main = putStrLn "yes" |
||||
EOF |
||||
$out/bin/ghc --make main.hs |
||||
echo compilation ok |
||||
[ $(./main) == "yes" ] |
||||
''; |
||||
|
||||
passthru = { |
||||
targetPrefix = ""; |
||||
# Our Cabal compiler name |
||||
haskellCompilerName = "ghc"; |
||||
}; |
||||
|
||||
meta = { |
||||
homepage = http://haskell.org/ghc; |
||||
description = "The Glasgow Haskell Compiler"; |
||||
license = stdenv.lib.licenses.bsd3; |
||||
platforms = ["x86_64-linux" "i686-linux"]; |
||||
}; |
||||
|
||||
} |
@ -1,42 +0,0 @@ |
||||
{stdenv, fetchurl, libedit, ghc, perl, gmp, ncurses}: |
||||
|
||||
# TODO(@Ericson2314): Cross compilation support |
||||
assert stdenv.targetPlatform == stdenv.hostPlatform; |
||||
|
||||
stdenv.mkDerivation rec { |
||||
version = "6.10.4"; |
||||
|
||||
name = "ghc-${version}"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.bz2"; |
||||
sha256 = "d66a8e52572f4ff819fe5c4e34c6dd1e84a7763e25c3fadcc222453c0bd8534d"; |
||||
}; |
||||
|
||||
buildInputs = [ghc libedit perl gmp]; |
||||
|
||||
hardeningDisable = [ "format" ]; |
||||
|
||||
configureFlags = [ |
||||
"--with-gmp-libraries=${gmp.out}/lib" |
||||
"--with-gmp-includes=${gmp.dev}/include" |
||||
"--with-gcc=${stdenv.cc}/bin/gcc" |
||||
]; |
||||
|
||||
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer"; |
||||
|
||||
passthru = { |
||||
targetPrefix = ""; |
||||
|
||||
# Our Cabal compiler name |
||||
haskellCompilerName = "ghc"; |
||||
}; |
||||
|
||||
meta = { |
||||
homepage = http://haskell.org/ghc; |
||||
description = "The Glasgow Haskell Compiler"; |
||||
platforms = ["x86_64-linux" "i686-linux"]; # Darwin is unsupported. |
||||
inherit (ghc.meta) license; |
||||
broken = true; # https://nix-cache.s3.amazonaws.com/log/6ys7lzckf2c0532kzhmss73mmz504can-ghc-6.10.4.drv |
||||
}; |
||||
} |
@ -1,54 +0,0 @@ |
||||
{stdenv, fetchurl, ghc, perl, gmp, ncurses}: |
||||
|
||||
# TODO(@Ericson2314): Cross compilation support |
||||
assert stdenv.targetPlatform == stdenv.hostPlatform; |
||||
|
||||
stdenv.mkDerivation rec { |
||||
version = "6.12.3"; |
||||
|
||||
name = "ghc-${version}"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.bz2"; |
||||
sha256 = "0s2y1sv2nq1cgliv735q2w3gg4ykv1c0g1adbv8wgwhia10vxgbc"; |
||||
}; |
||||
|
||||
buildInputs = [ghc perl gmp ncurses]; |
||||
|
||||
buildMK = '' |
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" |
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" |
||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" |
||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib" |
||||
''; |
||||
|
||||
preConfigure = '' |
||||
echo -n "${buildMK}" > mk/build.mk |
||||
''; |
||||
|
||||
configureFlags = [ |
||||
"--with-gcc=${stdenv.cc}/bin/gcc" |
||||
]; |
||||
|
||||
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer"; |
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and |
||||
# that in turn causes GHCi to abort |
||||
stripDebugFlags=["-S" "--keep-file-symbols"]; |
||||
|
||||
passthru = { |
||||
targetPrefix = ""; |
||||
|
||||
# Our Cabal compiler name |
||||
haskellCompilerName = "ghc"; |
||||
}; |
||||
|
||||
meta = { |
||||
homepage = http://haskell.org/ghc; |
||||
description = "The Glasgow Haskell Compiler"; |
||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ]; |
||||
platforms = ["x86_64-linux" "i686-linux"]; # Darwin is unsupported. |
||||
inherit (ghc.meta) license; |
||||
broken = true; # broken by gcc 5.x: http://hydra.nixos.org/build/33627548 |
||||
}; |
||||
} |
@ -1,78 +0,0 @@ |
||||
{ stdenv, fetchurl, ghc, perl, ncurses, libiconv |
||||
|
||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple |
||||
# library instead of the faster but GPLed integer-gmp library. |
||||
enableIntegerSimple ? false, gmp ? null |
||||
}: |
||||
|
||||
# TODO(@Ericson2314): Cross compilation support |
||||
assert stdenv.targetPlatform == stdenv.hostPlatform; |
||||
assert !enableIntegerSimple -> gmp != null; |
||||
|
||||
stdenv.mkDerivation rec { |
||||
version = "7.2.2"; |
||||
name = "ghc-${version}"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.bz2"; |
||||
sha256 = "0g87d3z9275dniaqzkf56qfgzp1msd89nqqhhm2gkc6iga072spz"; |
||||
}; |
||||
|
||||
patches = [ ./fix-7.2.2-clang.patch ./relocation.patch ]; |
||||
|
||||
buildInputs = [ ghc perl ncurses ] |
||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp; |
||||
|
||||
buildMK = '' |
||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" |
||||
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib" |
||||
${stdenv.lib.optionalString stdenv.isDarwin '' |
||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" |
||||
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" |
||||
''} |
||||
'' + (if enableIntegerSimple then '' |
||||
INTEGER_LIBRARY = integer-simple |
||||
'' else '' |
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" |
||||
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" |
||||
''); |
||||
|
||||
preConfigure = '' |
||||
echo -n "${buildMK}" > mk/build.mk |
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure |
||||
'' + stdenv.lib.optionalString stdenv.isDarwin '' |
||||
find . -name '*.hs' | xargs sed -i -e 's|ASSERT (|ASSERT(|' -e 's|ASSERT2 (|ASSERT2(|' -e 's|WARN (|WARN(|' |
||||
find . -name '*.lhs' | xargs sed -i -e 's|ASSERT (|ASSERT(|' -e 's|ASSERT2 (|ASSERT2(|' -e 's|WARN (|WARN(|' |
||||
export NIX_LDFLAGS+=" -no_dtrace_dof" |
||||
''; |
||||
|
||||
configureFlags = if stdenv.isDarwin then "--with-gcc=${./gcc-clang-wrapper.sh}" |
||||
else "--with-gcc=${stdenv.cc}/bin/gcc"; |
||||
|
||||
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer"; |
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and |
||||
# that in turn causes GHCi to abort |
||||
stripDebugFlags=["-S" "--keep-file-symbols"]; |
||||
|
||||
passthru = { |
||||
targetPprefix = ""; |
||||
|
||||
# Our Cabal compiler name |
||||
haskellCompilerName = "ghc"; |
||||
}; |
||||
|
||||
meta = { |
||||
homepage = http://haskell.org/ghc; |
||||
description = "The Glasgow Haskell Compiler"; |
||||
maintainers = [ |
||||
stdenv.lib.maintainers.marcweber |
||||
stdenv.lib.maintainers.andres |
||||
stdenv.lib.maintainers.peti |
||||
]; |
||||
platforms = ["x86_64-linux" "i686-linux"]; # Darwin is unsupported. |
||||
inherit (ghc.meta) license; |
||||
broken = true; # broken by 51cf42ad0d3ccb55af182f1f0ee5eb5094ea5995: https://hydra.nixos.org/build/60616815 |
||||
}; |
||||
|
||||
} |
@ -1,54 +0,0 @@ |
||||
{ stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, targetPackages, autoconf, alex, happy, makeStaticLibraries |
||||
, hscolour, xen, automake, gcc, git, zlib, libtool, enableIntegerSimple ? false |
||||
}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
version = "2.4.0"; |
||||
name = "HaLVM-${version}"; |
||||
isHaLVM = true; |
||||
enableParallelBuilding = false; |
||||
isGhcjs = false; |
||||
src = fetchgit { |
||||
rev = "65fad65966eb7e60f234453a35aeb564a09d2595"; |
||||
url = "https://github.com/GaloisInc/HaLVM"; |
||||
sha256 = "09633h38w0z20cz0wcfp9z5kzv8v1zwcv0wqvgq3c8svqbrxp28k"; |
||||
}; |
||||
prePatch = '' |
||||
sed -i '305 d' Makefile |
||||
sed -i '309,439 d' Makefile # Removes RPM packaging |
||||
sed -i '20 d' src/scripts/halvm-cabal.in |
||||
sed -ie 's|ld |${targetPackages.stdenv.cc.bintools}/bin/ld |g' src/scripts/ldkernel.in |
||||
''; |
||||
configureFlags = stdenv.lib.optional (!enableIntegerSimple) [ "--enable-gmp" ]; |
||||
propagatedNativeBuildInputs = [ alex happy ]; |
||||
buildInputs = |
||||
let haskellPkgs = [ alex happy bootPkgs.hscolour bootPkgs.cabal-install bootPkgs.haddock bootPkgs.hpc |
||||
]; in [ bootPkgs.ghc |
||||
automake perl git targetPackages.stdenv.cc.bintools |
||||
autoconf xen zlib ncurses.dev |
||||
libtool gmp ] ++ haskellPkgs; |
||||
preConfigure = '' |
||||
autoconf |
||||
patchShebangs . |
||||
''; |
||||
hardeningDisable = ["all"]; |
||||
postInstall = '' |
||||
patchShebangs $out/bin |
||||
$out/bin/halvm-ghc-pkg recache |
||||
''; |
||||
passthru = { |
||||
inherit bootPkgs; |
||||
cross.config = "halvm"; |
||||
cc = "${gcc}/bin/gcc"; |
||||
ld = "${targetPackages.stdenv.cc.bintools}/bin/ld"; |
||||
}; |
||||
|
||||
meta = { |
||||
homepage = https://github.com/GaloisInc/HaLVM; |
||||
description = "The Haskell Lightweight Virtual Machine (HaLVM): GHC running on Xen"; |
||||
platforms = ["x86_64-linux"]; # other platforms don't have Xen |
||||
maintainers = with stdenv.lib.maintainers; [ dmjio ]; |
||||
inherit (bootPkgs.ghc.meta) license; |
||||
broken = true; # https://nix-cache.s3.amazonaws.com/log/6i98mhbq9nzzhwr4svlivm4gz91l2w0f-HaLVM-2.4.0.drv |
||||
}; |
||||
} |
@ -1,54 +0,0 @@ |
||||
# Note: The Haskell package set used for building UHC is |
||||
# determined in the file top-level/haskell-packages.nix. |
||||
{ stdenv, coreutils, m4, libtool, clang, ghcWithPackages, fetchFromGitHub }: |
||||
|
||||
let wrappedGhc = ghcWithPackages (hpkgs: with hpkgs; [fgl vector syb uulib network binary hashable uhc-util mtl transformers directory containers array process filepath shuffle uuagc] ); |
||||
in stdenv.mkDerivation rec { |
||||
version = "1.1.9.4"; |
||||
name = "uhc-${version}"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "UU-ComputerScience"; |
||||
repo = "uhc"; |
||||
rev = "v${version}"; |
||||
sha256 = "1s84csk6zgzj09igxgdza7gb52jdn3jsr8lygl5xplshv8yzl34n"; |
||||
}; |
||||
|
||||
postUnpack = "sourceRoot=\${sourceRoot}/EHC"; |
||||
|
||||
buildInputs = [ m4 wrappedGhc clang libtool ]; |
||||
|
||||
configureFlags = [ "--with-gcc=${clang}/bin/clang" ]; |
||||
|
||||
# UHC builds packages during compilation; these are by default |
||||
# installed in the user-specific package config file. We do not |
||||
# want that, and hack the build process to use a temporary package |
||||
# configuration file instead. |
||||
preConfigure = '' |
||||
p=`pwd`/uhc-local-packages/ |
||||
ghc-pkg init $p |
||||
sed -i "s|--user|--package-db=$p|g" mk/shared.mk.in |
||||
sed -i "s|-fglasgow-exts|-fglasgow-exts -package-conf=$p|g" mk/shared.mk.in |
||||
sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/dist.mk |
||||
sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/config.mk.in |
||||
sed -i "s|--make|--make -package-db=$p|g" src/ehc/files2.mk |
||||
sed -i "s|--make|--make -package-db=$p|g" src/gen/files.mk |
||||
''; |
||||
|
||||
inherit clang; |
||||
|
||||
meta = with stdenv.lib; { |
||||
homepage = http://www.cs.uu.nl/wiki/UHC; |
||||
description = "Utrecht Haskell Compiler"; |
||||
maintainers = [ maintainers.phile314 ]; |
||||
|
||||
# UHC i686 support is broken, see |
||||
# https://github.com/UU-ComputerScience/uhc/issues/52 |
||||
# |
||||
# Darwin build is broken as well at the moment. |
||||
# On Darwin, the GNU libtool is used, which does not |
||||
# support the -static flag and thus breaks the build. |
||||
platforms = ["x86_64-linux"]; |
||||
broken = true; |
||||
}; |
||||
} |
Loading…
Reference in new issue