From a45dfaa3351fd6c7c73655afa473e67d8dd5a8e3 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 26 Jan 2018 10:15:06 +0100 Subject: [PATCH] Drop broken Haskell compilers. - 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 time --- .../compilers/ghc/6.10.2-binary.nix | 112 ------------------ pkgs/development/compilers/ghc/6.10.4.nix | 42 ------- pkgs/development/compilers/ghc/6.12.3.nix | 54 --------- pkgs/development/compilers/ghc/7.2.2.nix | 78 ------------ pkgs/development/compilers/halvm/2.4.0.nix | 54 --------- pkgs/development/compilers/uhc/default.nix | 54 --------- pkgs/top-level/aliases.nix | 1 - pkgs/top-level/haskell-packages.nix | 34 +----- 8 files changed, 2 insertions(+), 427 deletions(-) delete mode 100644 pkgs/development/compilers/ghc/6.10.2-binary.nix delete mode 100644 pkgs/development/compilers/ghc/6.10.4.nix delete mode 100644 pkgs/development/compilers/ghc/6.12.3.nix delete mode 100644 pkgs/development/compilers/ghc/7.2.2.nix delete mode 100644 pkgs/development/compilers/halvm/2.4.0.nix delete mode 100644 pkgs/development/compilers/uhc/default.nix diff --git a/pkgs/development/compilers/ghc/6.10.2-binary.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix deleted file mode 100644 index abf14808c58..00000000000 --- a/pkgs/development/compilers/ghc/6.10.2-binary.nix +++ /dev/null @@ -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"]; - }; - -} diff --git a/pkgs/development/compilers/ghc/6.10.4.nix b/pkgs/development/compilers/ghc/6.10.4.nix deleted file mode 100644 index c29698c7e48..00000000000 --- a/pkgs/development/compilers/ghc/6.10.4.nix +++ /dev/null @@ -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 - }; -} diff --git a/pkgs/development/compilers/ghc/6.12.3.nix b/pkgs/development/compilers/ghc/6.12.3.nix deleted file mode 100644 index d2cc4a2e9c3..00000000000 --- a/pkgs/development/compilers/ghc/6.12.3.nix +++ /dev/null @@ -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 - }; -} diff --git a/pkgs/development/compilers/ghc/7.2.2.nix b/pkgs/development/compilers/ghc/7.2.2.nix deleted file mode 100644 index 715f0320d50..00000000000 --- a/pkgs/development/compilers/ghc/7.2.2.nix +++ /dev/null @@ -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 - }; - -} diff --git a/pkgs/development/compilers/halvm/2.4.0.nix b/pkgs/development/compilers/halvm/2.4.0.nix deleted file mode 100644 index 0c4cef653d8..00000000000 --- a/pkgs/development/compilers/halvm/2.4.0.nix +++ /dev/null @@ -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 - }; -} diff --git a/pkgs/development/compilers/uhc/default.nix b/pkgs/development/compilers/uhc/default.nix deleted file mode 100644 index bf48abb923f..00000000000 --- a/pkgs/development/compilers/uhc/default.nix +++ /dev/null @@ -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; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index b591c30796d..ef49fceab72 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -79,7 +79,6 @@ mapAliases (rec { htmlTidy = html-tidy; # added 2014-12-06 iana_etc = iana-etc; # added 2017-03-08 idea = jetbrains; # added 2017-04-03 - inherit (haskell.compiler) uhc; # 2015-05-15 inotifyTools = inotify-tools; joseki = apache-jena-fuseki; # added 2016-02-28 jquery_ui = jquery-ui; # added 2014-09-07 diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 9fb71df53fe..51726ca730d 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -6,20 +6,16 @@ let # These are attributes in compiler and packages that don't support integer-simple. integerSimpleExcludes = [ - "ghc6102Binary" "ghc704Binary" "ghc742Binary" "ghc784Binary" "ghc7103Binary" "ghc821Binary" - "ghc6104" - "ghc6123" "ghc704" "ghc763" "ghcjs" "ghcjsHEAD" "ghcCross" - "uhc" "integer-simple" ]; @@ -35,27 +31,15 @@ in rec { compiler = { - ghc6102Binary = callPackage ../development/compilers/ghc/6.10.2-binary.nix { - gmp = pkgs.gmp4; - }; - ghc704Binary = callPackage ../development/compilers/ghc/7.0.4-binary.nix { - gmp = pkgs.gmp4; - }; - ghc742Binary = callPackage ../development/compilers/ghc/7.4.2-binary.nix { - gmp = pkgs.gmp4; - }; + ghc704Binary = callPackage ../development/compilers/ghc/7.0.4-binary.nix { gmp = pkgs.gmp4; }; + ghc742Binary = callPackage ../development/compilers/ghc/7.4.2-binary.nix { gmp = pkgs.gmp4; }; ghc784Binary = callPackage ../development/compilers/ghc/7.8.4-binary.nix { }; ghc7103Binary = callPackage ../development/compilers/ghc/7.10.3-binary.nix { }; ghc821Binary = callPackage ../development/compilers/ghc/8.2.1-binary.nix { }; - ghc6104 = callPackage ../development/compilers/ghc/6.10.4.nix { ghc = compiler.ghc6102Binary; }; - ghc6123 = callPackage ../development/compilers/ghc/6.12.3.nix { ghc = compiler.ghc6102Binary; }; ghc704 = callPackage ../development/compilers/ghc/7.0.4.nix { ghc = compiler.ghc704Binary; }; - ghc722 = callPackage ../development/compilers/ghc/7.2.2.nix { - ghc = compiler.ghc704Binary; - }; ghc742 = callPackage ../development/compilers/ghc/7.4.2.nix { ghc = compiler.ghc704Binary; }; @@ -106,15 +90,6 @@ in rec { bootPkgs = packages.ghc802; inherit (pkgs) cabal-install; }; - ghcHaLVM240 = callPackage ../development/compilers/halvm/2.4.0.nix rec { - bootPkgs = packages.ghc7103Binary; - inherit (bootPkgs) hscolour alex happy; - }; - - uhc = callPackage ../development/compilers/uhc/default.nix ({ - stdenv = pkgs.clangStdenv; - inherit (packages.ghc7103Binary) ghcWithPackages; - }); # The integer-simple attribute set contains all the GHC compilers # build with integer-simple instead of integer-gmp. @@ -177,11 +152,6 @@ in rec { compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.0.x.nix { }; packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { }; }; - ghcHaLVM240 = callPackage ../development/haskell-modules { - buildHaskellPackages = bh.packages.ghcHaLVM240; - ghc = bh.compiler.ghcHaLVM240; - compilerConfig = callPackage ../development/haskell-modules/configuration-halvm-2.4.0.nix { }; - }; # The integer-simple attribute set contains package sets for all the GHC compilers # using integer-simple instead of integer-gmp.