summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2018-04-03 02:22:54 +0300
committerTuomas Tynkkynen <tuomas@tuxera.com>2018-04-03 02:22:54 +0300
commit747ebe3f660ea4a6e7bd03831f4e95a66d59b526 (patch)
treeb9575026aa7949f51541135be0059b54eda07bbe /pkgs/development/compilers
parent4c46f13f15c602a88dfd87a37acdc94653232a1d (diff)
parent00fc66dc7dcda7fc38a9cc7f4dbd7bb66f28c5f9 (diff)
downloadnixlib-747ebe3f660ea4a6e7bd03831f4e95a66d59b526.tar
nixlib-747ebe3f660ea4a6e7bd03831f4e95a66d59b526.tar.gz
nixlib-747ebe3f660ea4a6e7bd03831f4e95a66d59b526.tar.bz2
nixlib-747ebe3f660ea4a6e7bd03831f4e95a66d59b526.tar.lz
nixlib-747ebe3f660ea4a6e7bd03831f4e95a66d59b526.tar.xz
nixlib-747ebe3f660ea4a6e7bd03831f4e95a66d59b526.tar.zst
nixlib-747ebe3f660ea4a6e7bd03831f4e95a66d59b526.zip
Merge remote-tracking branch 'upstream/master' into staging
Conflicts:
	pkgs/top-level/all-packages.nix
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/binaryen/default.nix4
-rw-r--r--pkgs/development/compilers/elm/default.nix21
-rw-r--r--pkgs/development/compilers/elm/packages/elm-package.nix6
-rw-r--r--pkgs/development/compilers/ghcjs/head.nix2
-rw-r--r--pkgs/development/compilers/openjdk/10.nix2
-rw-r--r--pkgs/development/compilers/openjdk/7.nix244
-rw-r--r--pkgs/development/compilers/openjdk/8.nix2
-rw-r--r--pkgs/development/compilers/openjdk/9.nix262
-rw-r--r--pkgs/development/compilers/openjdk/bootstrap.nix35
-rw-r--r--pkgs/development/compilers/openjdk/cppflags-include-fix.patch16
-rw-r--r--pkgs/development/compilers/openjdk/currency-date-range.patch14
-rw-r--r--pkgs/development/compilers/openjdk/fix-java-home-jdk9.patch14
-rw-r--r--pkgs/development/compilers/openjdk/fix-java-home.patch17
-rw-r--r--pkgs/development/compilers/openjdk/paxctl.patch28
-rw-r--r--pkgs/development/compilers/openjdk/read-truststore-from-env-jdk9.patch20
-rw-r--r--pkgs/development/compilers/openjdk/read-truststore-from-env.patch21
-rw-r--r--pkgs/development/compilers/openjdk/swing-use-gtk-jdk8.patch (renamed from pkgs/development/compilers/openjdk/swing-use-gtk.patch)0
-rw-r--r--pkgs/development/compilers/openjdk/swing-use-gtk-jdk9.patch26
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk9-linux.nix158
-rw-r--r--pkgs/development/compilers/purescript/psc-package/default.nix4
-rw-r--r--pkgs/development/compilers/sbcl/default.nix4
-rw-r--r--pkgs/development/compilers/swift/default.nix66
-rw-r--r--pkgs/development/compilers/swift/patches/0003-build-presets-linux-disable-tests.patch38
-rw-r--r--pkgs/development/compilers/swift/patches/icu59.patch113
-rw-r--r--pkgs/development/compilers/swift/patches/remove_xlocale.patch54
-rw-r--r--pkgs/development/compilers/swift/patches/sigaltstack.patch11
-rw-r--r--pkgs/development/compilers/swift/patches/sigunused.patch11
-rw-r--r--pkgs/development/compilers/swift/purity.patch20
28 files changed, 78 insertions, 1135 deletions
diff --git a/pkgs/development/compilers/binaryen/default.nix b/pkgs/development/compilers/binaryen/default.nix
index 2c2869f76e72..fc75fe92c730 100644
--- a/pkgs/development/compilers/binaryen/default.nix
+++ b/pkgs/development/compilers/binaryen/default.nix
@@ -1,11 +1,11 @@
 { stdenv, cmake, fetchFromGitHub, emscriptenRev ? null }:
 
 let
-  defaultVersion = "44";
+  defaultVersion = "45";
 
   # Map from git revs to SHA256 hashes
   sha256s = {
-    "version_44" = "0zsqppc05fm62807w6vyccxkk2y2gar7kxbxxixq8zz3xsp6w84p";
+    "version_45" = "1wgzfzjjzkiaz0rf2lnwrcvlcsjvjhyvbyh58jxhqq43vi34zyjc";
     "1.37.36" = "1wgzfzjjzkiaz0rf2lnwrcvlcsjvjhyvbyh58jxhqq43vi34zyjc";
   };
 in
diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix
index 4520363a53b2..8ed34cf9d1e0 100644
--- a/pkgs/development/compilers/elm/default.nix
+++ b/pkgs/development/compilers/elm/default.nix
@@ -74,23 +74,26 @@ let
             elm-format = self.callPackage ./packages/elm-format.nix { };
             elm-interface-to-json = self.callPackage ./packages/elm-interface-to-json.nix {
               aeson-pretty = self.aeson-pretty_0_7_2;
+              either = hlib.overrideCabal self.either (drv :{
+                jailbreak = true;
+                version = "4.4.1.1";
+                sha256 = "1lrlwqqnm6ibfcydlv5qvvssw7bm0c6yypy0rayjzv1znq7wp1xh";
+                libraryHaskellDepends = drv.libraryHaskellDepends or [] ++ [
+                  self.exceptions self.free self.mmorph self.monad-control
+                  self.MonadRandom self.profunctors self.transformers
+                  self.transformers-base
+                ];
+              });
             };
           };
       in elmPkgs // {
         inherit elmPkgs;
         elmVersion = elmRelease.version;
-        # needed for elm-package
-        http-client = hlib.overrideCabal super.http-client (drv: {
-          version = "0.4.31.2";
-          sha256 = "12yq2l6bvmxg5w6cw5ravdh39g8smwn1j44mv36pfmkhm5402h8n";
-        });
-        http-client-tls = hlib.overrideCabal super.http-client-tls (drv: {
-          version = "0.2.4.1";
-          sha256 = "18wbca7jg15p0ds3339f435nqv2ng0fqc4bylicjzlsww625ij4d";
-        });
         # https://github.com/elm-lang/elm-compiler/issues/1566
         indents = hlib.overrideCabal super.indents (drv: {
           version = "0.3.3";
+          #test dep tasty has a version mismatch
+          doCheck = false;
           sha256 = "16lz21bp9j14xilnq8yym22p3saxvc9fsgfcf5awn2a6i6n527xn";
           libraryHaskellDepends = drv.libraryHaskellDepends ++ [super.concatenative];
         });
diff --git a/pkgs/development/compilers/elm/packages/elm-package.nix b/pkgs/development/compilers/elm/packages/elm-package.nix
index 4a60b3dfb387..49eddb58a142 100644
--- a/pkgs/development/compilers/elm/packages/elm-package.nix
+++ b/pkgs/development/compilers/elm/packages/elm-package.nix
@@ -1,6 +1,6 @@
 { mkDerivation, aeson, aeson-pretty_0_7_2, ansi-wl-pprint, base, binary
 , bytestring, containers, directory, edit-distance, elm-compiler
-, fetchgit, filepath, HTTP, http-client, http-client-tls
+, fetchgit, fetchurl, filepath, HTTP, http-client, http-client-tls
 , http-types, mtl, network, optparse-applicative, parallel-io
 , pretty, stdenv, text, time, unordered-containers, vector
 , zip-archive
@@ -13,6 +13,10 @@ mkDerivation {
     sha256 = "19krnkjvfk02gmmic5h5i1i0lw7s30927bnd5g57cj8nqbigysv7";
     rev = "8bd150314bacab5b6fc451927aa01deec2276fbf";
   };
+  patches = fetchurl {
+    url = https://github.com/jerith666/elm-package/commit/40bab60c2fbff70812cc24cdd97f5e09db3844ad.patch;
+    sha256 = "0j6pi6cv3h9s6vz68bh0c73fysvk83yhhk56kgshvnrmnpcb3jib";
+  };
   isLibrary = true;
   isExecutable = true;
   libraryHaskellDepends = [
diff --git a/pkgs/development/compilers/ghcjs/head.nix b/pkgs/development/compilers/ghcjs/head.nix
index f062a3db8118..84eb2d8bd0da 100644
--- a/pkgs/development/compilers/ghcjs/head.nix
+++ b/pkgs/development/compilers/ghcjs/head.nix
@@ -47,6 +47,4 @@ bootPkgs.callPackage ./base.nix {
   stage2 = import ./head_stage2.nix;
 
   patches = [ ./ghcjs-head.patch ];
-
-  broken = true;  # https://hydra.nixos.org/build/71923242
 }
diff --git a/pkgs/development/compilers/openjdk/10.nix b/pkgs/development/compilers/openjdk/10.nix
index 2a0c7a1ac01c..545a333029d7 100644
--- a/pkgs/development/compilers/openjdk/10.nix
+++ b/pkgs/development/compilers/openjdk/10.nix
@@ -113,7 +113,7 @@ let
       rm -rf $out/lib/openjdk/demo
       ${lib.optionalString minimal ''
         for d in $out/lib/openjdk/lib $jre/lib/openjdk/jre/lib; do
-          rm ''${d}/{libjsound,libjsoundalsa,libawt*,libfontmanager}.so
+          rm ''${d}/{libjsound,libjsoundalsa,libfontmanager}.so
         done
       ''}
 
diff --git a/pkgs/development/compilers/openjdk/7.nix b/pkgs/development/compilers/openjdk/7.nix
deleted file mode 100644
index 13f8bcfdb1de..000000000000
--- a/pkgs/development/compilers/openjdk/7.nix
+++ /dev/null
@@ -1,244 +0,0 @@
-{ stdenv, fetchurl, unzip, zip, procps, coreutils, alsaLib, ant, freetype
-, which, bootjdk, nettools, xorg, file, cups
-, fontconfig, cpio, cacert, perl, setJavaClassPath
-, minimal ? false
-}:
-
-let
-
-  /**
-   * The JRE libraries are in directories that depend on the CPU.
-   */
-  architecture =
-    if stdenv.system == "i686-linux" then
-      "i386"
-    else if stdenv.system == "x86_64-linux" then
-      "amd64"
-    else
-      throw "openjdk requires i686-linux or x86_64 linux";
-
-  update = "111";
-
-  build = "01";
-
-  # On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well.
-  paxflags = if stdenv.isi686 then "msp" else "m";
-
-  baseurl = "http://hg.openjdk.java.net/jdk7u/jdk7u";
-  repover = "jdk7u${update}-b${build}";
-  jdk7 = fetchurl {
-    url = "${baseurl}/archive/${repover}.tar.gz";
-    sha256 = "0wgb7hr2gipx1jg28fnsjh7xa744sh1mgr6z3xivmnsfy3dm91gi";
-  };
-  langtools = fetchurl {
-    url = "${baseurl}/langtools/archive/${repover}.tar.gz";
-    sha256 = "0x1xs923h6sma02cbp1whg735x8vcndh5k01b7rkf714g6rxwa0y";
-  };
-  hotspot = fetchurl {
-    url = "${baseurl}/hotspot/archive/${repover}.tar.gz";
-    sha256 = "187apnsvnd4cfa7ss5g59dbh7x5ah8f1lwa2wvjfv055h2cmphpn";
-  };
-  corba = fetchurl {
-    url = "${baseurl}/corba/archive/${repover}.tar.gz";
-    sha256 = "0vmxf5sgjcmkm7i1scanaa2x75a1byj8b36vcajlr6j7qmdx6r8c";
-  };
-  jdk = fetchurl {
-    url = "${baseurl}/jdk/archive/${repover}.tar.gz";
-    sha256 = "1f8f2dgrjhx8aw1gzawrf8qggf5j0dygsla08bbsxhx5mc5a6cka";
-  };
-  jaxws = fetchurl {
-    url = "${baseurl}/jaxws/archive/${repover}.tar.gz";
-    sha256 = "03982ajxm0hzany1jg009ym84vryx7a8qfi6wcgjxyxvk8vnz37c";
-  };
-  jaxp = fetchurl {
-    url = "${baseurl}/jaxp/archive/${repover}.tar.gz";
-    sha256 = "0578h04y1ha60yjplsa8lqdjds9s2lxzgs9ybm9rs1rqzxmm0xmy";
-  };
-  openjdk = stdenv.mkDerivation rec {
-    name = "openjdk-7u${update}b${build}";
-
-    srcs = [ jdk7 langtools hotspot corba jdk jaxws jaxp ];
-    sourceRoot = ".";
-
-    outputs = [ "out" "jre" ];
-
-    buildInputs =
-      [ unzip procps ant which zip cpio nettools alsaLib
-        xorg.libX11 xorg.libXt xorg.libXext xorg.libXrender xorg.libXtst
-        xorg.libXi xorg.libXinerama xorg.libXcursor xorg.lndir
-        fontconfig perl file bootjdk
-      ];
-
-    NIX_CFLAGS_COMPILE = [
-      "-Wno-error=deprecated-declarations"
-      "-Wno-error=format-overflow" # newly detected by gcc7
-    ];
-
-    NIX_LDFLAGS = if minimal then null else "-lfontconfig -lXcursor -lXinerama";
-
-    postUnpack = ''
-      ls | grep jdk | grep -v '^jdk7u' | awk -F- '{print $1}' | while read p; do
-        mv $p-* $(ls | grep '^jdk7u')/$p
-      done
-      cd jdk7u-*
-
-      sed -i -e "s@/usr/bin/test@${coreutils}/bin/test@" \
-        -e "s@/bin/ls@${coreutils}/bin/ls@" \
-        hotspot/make/linux/makefiles/sa.make
-
-      sed -i "s@/bin/echo -e@${coreutils}/bin/echo -e@" \
-        {jdk,corba}/make/common/shared/Defs-utils.gmk
-
-      tar xf ${cups.src}
-      cupsDir=$(echo $(pwd)/cups-*)
-      makeFlagsArray+=(CUPS_HEADERS_PATH=$cupsDir)
-    '';
-
-    patches = [
-      ./cppflags-include-fix.patch
-      ./fix-java-home.patch
-      ./paxctl.patch
-      ./read-truststore-from-env.patch
-      ./currency-date-range.patch
-    ];
-
-    NIX_NO_SELF_RPATH = true;
-
-    makeFlags = [
-      "SORT=${coreutils}/bin/sort"
-      "ALSA_INCLUDE=${alsaLib.dev}/include/alsa/version.h"
-      "FREETYPE_HEADERS_PATH=${freetype.dev}/include"
-      "FREETYPE_LIB_PATH=${freetype.out}/lib"
-      "MILESTONE=${update}"
-      "BUILD_NUMBER=b${build}"
-      "USRBIN_PATH="
-      "COMPILER_PATH="
-      "DEVTOOLS_PATH="
-      "UNIXCOMMAND_PATH="
-      "BOOTDIR=${bootjdk.home}"
-      "STATIC_CXX=false"
-      "UNLIMITED_CRYPTO=1"
-      "FULL_DEBUG_SYMBOLS=0"
-    ] ++ stdenv.lib.optional minimal "BUILD_HEADLESS=1";
-
-    configurePhase = "true";
-
-    preBuild = ''
-      # We also need to PaX-mark in the middle of the build
-      substituteInPlace hotspot/make/linux/makefiles/launcher.make \
-         --replace XXX_PAXFLAGS_XXX ${paxflags}
-      substituteInPlace jdk/make/common/Program.gmk  \
-         --replace XXX_PAXFLAGS_XXX ${paxflags}
-    '';
-
-    installPhase = ''
-      mkdir -p $out/lib/openjdk $out/share $jre/lib/openjdk
-
-      cp -av build/*/j2sdk-image/* $out/lib/openjdk
-
-      # Move some stuff to top-level.
-      mv $out/lib/openjdk/include $out/include
-      mv $out/lib/openjdk/man $out/share/man
-
-      # jni.h expects jni_md.h to be in the header search path.
-      ln -s $out/include/linux/*_md.h $out/include/
-
-      # Remove some broken manpages.
-      rm -rf $out/share/man/ja*
-
-      # Remove crap from the installation.
-      rm -rf $out/lib/openjdk/demo $out/lib/openjdk/sample
-
-      # Move the JRE to a separate output.
-      mv $out/lib/openjdk/jre $jre/lib/openjdk/
-      mkdir $out/lib/openjdk/jre
-      lndir $jre/lib/openjdk/jre $out/lib/openjdk/jre
-
-      rm -rf $out/lib/openjdk/jre/bin
-      ln -s $out/lib/openjdk/bin $out/lib/openjdk/jre/bin
-
-      # Set PaX markings
-      exes=$(file $out/lib/openjdk/bin/* $jre/lib/openjdk/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
-      echo "to mark: *$exes*"
-      for file in $exes; do
-        echo "marking *$file*"
-        paxmark ${paxflags} "$file"
-      done
-
-      # Remove duplicate binaries.
-      for i in $(cd $out/lib/openjdk/bin && echo *); do
-        if [ "$i" = java ]; then continue; fi
-        if cmp -s $out/lib/openjdk/bin/$i $jre/lib/openjdk/jre/bin/$i; then
-          ln -sfn $jre/lib/openjdk/jre/bin/$i $out/lib/openjdk/bin/$i
-        fi
-      done
-
-      # Generate certificates.
-      pushd $jre/lib/openjdk/jre/lib/security
-      rm cacerts
-      perl ${./generate-cacerts.pl} $jre/lib/openjdk/jre/bin/keytool ${cacert}/etc/ssl/certs/ca-bundle.crt
-      popd
-
-      ln -s $out/lib/openjdk/bin $out/bin
-      ln -s $jre/lib/openjdk/jre/bin $jre/bin
-    ''; # */
-
-    # FIXME: this is unnecessary once the multiple-outputs branch is merged.
-    preFixup = ''
-      prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}"
-      patchELF $jre
-      propagatedBuildInputs+=" $jre"
-
-      # Propagate the setJavaClassPath setup hook from the JRE so that
-      # any package that depends on the JRE has $CLASSPATH set up
-      # properly.
-      mkdir -p $jre/nix-support
-      printWords ${setJavaClassPath} > $jre/nix-support/propagated-build-inputs
-
-      # Set JAVA_HOME automatically.
-      mkdir -p $out/nix-support
-      cat <<EOF > $out/nix-support/setup-hook
-      if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out/lib/openjdk; fi
-      EOF
-    '';
-
-    postFixup = ''
-      # Build the set of output library directories to rpath against
-      LIBDIRS=""
-      for output in $outputs; do
-        LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \; | sort | uniq | tr '\n' ':'):$LIBDIRS"
-      done
-
-      # Add the local library paths to remove dependencies on the bootstrap
-      for output in $outputs; do
-        OUTPUTDIR="$(eval echo \$$output)"
-        BINLIBS="$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)"
-        echo "$BINLIBS" | while read i; do
-          patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true
-          patchelf --shrink-rpath "$i" || true
-        done
-      done
-
-      # Test to make sure that we don't depend on the bootstrap
-      for output in $outputs; do
-        if grep -q -r '${bootjdk}' $(eval echo \$$output); then
-          echo "Extraneous references to ${bootjdk} detected"
-          exit 1
-        fi
-      done
-    '';
-
-    meta = {
-      homepage = http://openjdk.java.net/;
-      license = stdenv.lib.licenses.gpl2;
-      description = "The open-source Java Development Kit";
-      maintainers = [ stdenv.lib.maintainers.eelco ];
-      platforms = stdenv.lib.platforms.linux;
-    };
-
-    passthru = {
-      inherit architecture;
-      home = "${openjdk}/lib/openjdk";
-    };
-  };
-in openjdk
diff --git a/pkgs/development/compilers/openjdk/8.nix b/pkgs/development/compilers/openjdk/8.nix
index 24cf1b8a0c93..705898a74f37 100644
--- a/pkgs/development/compilers/openjdk/8.nix
+++ b/pkgs/development/compilers/openjdk/8.nix
@@ -93,7 +93,7 @@ let
       ./004_add-fontconfig.patch
       ./005_enable-infinality.patch
     ] ++ lib.optionals (!minimal && enableGnome2) [
-      ./swing-use-gtk.patch
+      ./swing-use-gtk-jdk8.patch
     ];
 
     preConfigure = ''
diff --git a/pkgs/development/compilers/openjdk/9.nix b/pkgs/development/compilers/openjdk/9.nix
deleted file mode 100644
index 7ac3931c93d7..000000000000
--- a/pkgs/development/compilers/openjdk/9.nix
+++ /dev/null
@@ -1,262 +0,0 @@
-{ stdenv, lib, fetchurl, bash, cpio, pkgconfig, file, which, unzip, zip, cups, freetype
-, alsaLib, bootjdk, cacert, perl, liberation_ttf, fontconfig, zlib, lndir
-, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama, libXcursor
-, libjpeg, giflib
-, setJavaClassPath
-, minimal ? false
-#, enableInfinality ? true # font rendering patch
-, enableGnome2 ? true, gtk2, gnome_vfs, glib, GConf
-}:
-
-let
-
-  /**
-   * The JRE libraries are in directories that depend on the CPU.
-   */
-  architecture =
-    if stdenv.system == "i686-linux" then
-      "i386"
-    else if stdenv.system == "x86_64-linux" then
-      "amd64"
-    else
-      throw "openjdk requires i686-linux or x86_64 linux";
-
-  update = "9.0.4";
-  build = "12";
-  baseurl = "http://hg.openjdk.java.net/jdk-updates/jdk9u";
-  repover = "jdk-${update}+${build}";
-  paxflags = if stdenv.isi686 then "msp" else "m";
-  jdk9 = fetchurl {
-             url = "${baseurl}/archive/${repover}.tar.gz";
-             sha256 = "06hnrzkwxgrfq26il1mjyl6wgb7x3qym69pjbddhl9m29n2si3jh";
-          };
-  langtools = fetchurl {
-             url = "${baseurl}/langtools/archive/${repover}.tar.gz";
-             sha256 = "16xqnqn773p6ywcdjx801vbng2skjal7svydn0s7wf3ldqzx64mi";
-          };
-  hotspot = fetchurl {
-             url = "${baseurl}/hotspot/archive/${repover}.tar.gz";
-             sha256 = "0g5ddffl2qykrjf17ac9as60rd4sfyv7s2fpgjn86k4a69gkx93v";
-          };
-  corba = fetchurl {
-             url = "${baseurl}/corba/archive/${repover}.tar.gz";
-             sha256 = "14585dzs2mfzgzrnbvc062pigngs35hajwpr22m6fzbm7580vnqk";
-          };
-  jdk = fetchurl {
-             url = "${baseurl}/jdk/archive/${repover}.tar.gz";
-             sha256 = "16595jdg3y9zy70q8i615a7d6w0zzbydfxylvaq42wrsc7jw733h";
-          };
-  jaxws = fetchurl {
-             url = "${baseurl}/jaxws/archive/${repover}.tar.gz";
-             sha256 = "1m1aspc1hq74w0bkasrfvp8ygs6psbc1l61vfw9244j2vgfahjgn";
-          };
-  jaxp = fetchurl {
-             url = "${baseurl}/jaxp/archive/${repover}.tar.gz";
-             sha256 = "06ns2giw366vjivb6d46gqwfvfzkaddrgd1x6y8w37ywygp50lxm";
-          };
-  nashorn = fetchurl {
-             url = "${baseurl}/nashorn/archive/${repover}.tar.gz";
-             sha256 = "0z6mlzvz1hh1yzli69qjlrcwqdjnivbjbqqrqi4hhpls6z0a2ch7";
-          };
-  openjdk9 = stdenv.mkDerivation {
-    name = "openjdk-${update}-b${build}";
-
-    srcs = [ jdk9 langtools hotspot corba jdk jaxws jaxp nashorn ];
-    sourceRoot = ".";
-
-    outputs = [ "out" "jre" ];
-
-    nativeBuildInputs = [ pkgconfig ];
-    buildInputs = [
-      cpio file which unzip zip perl bootjdk zlib cups freetype alsaLib
-      libjpeg giflib libX11 libICE libXext libXrender libXtst libXt libXtst
-      libXi libXinerama libXcursor lndir fontconfig
-    ] ++ lib.optionals (!minimal && enableGnome2) [
-      gtk2 gnome_vfs GConf glib
-    ];
-
-    #move the seven other source dirs under the main jdk8u directory,
-    #with version suffixes removed, as the remainder of the build will expect
-    prePatch = ''
-      mainDir=$(find . -maxdepth 1 -name jdk9\*);
-      find . -maxdepth 1 -name \*jdk\* -not -name jdk9\* | awk -F- '{print $1}' | while read p; do
-        mv $p-* $mainDir/$p
-      done
-      cd $mainDir
-    '';
-
-    patches = [
-      ./fix-java-home-jdk9.patch
-      ./read-truststore-from-env-jdk9.patch
-      ./currency-date-range-jdk8.patch
-    #] ++ lib.optionals (!minimal && enableInfinality) [
-    #  ./004_add-fontconfig.patch
-    #  ./005_enable-infinality.patch
-    ] ++ lib.optionals (!minimal && enableGnome2) [
-      ./swing-use-gtk-jdk9.patch
-    ];
-
-    preConfigure = ''
-      chmod +x configure
-      substituteInPlace configure --replace /bin/bash "${bash}/bin/bash"
-
-      configureFlagsArray=(
-        "--with-boot-jdk=${bootjdk.home}"
-        "--with-update-version=${update}"
-        "--with-build-number=${build}"
-        "--with-milestone=fcs"
-        "--enable-unlimited-crypto"
-        "--disable-debug-symbols"
-        "--disable-freetype-bundling"
-        "--with-zlib=system"
-        "--with-giflib=system"
-        "--with-stdc++lib=dynamic"
-
-        # glibc 2.24 deprecated readdir_r so we need this
-        # See https://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg49006.html
-        "--with-extra-cflags=-Wno-error=deprecated-declarations -Wno-error=format-contains-nul -Wno-error=unused-result"
-    ''
-    + lib.optionalString minimal "\"--enable-headless-only\""
-    + ");"
-    # https://bugzilla.redhat.com/show_bug.cgi?id=1306558
-    # https://github.com/JetBrains/jdk8u/commit/eaa5e0711a43d64874111254d74893fa299d5716
-    + stdenv.lib.optionalString stdenv.cc.isGNU ''
-      NIX_CFLAGS_COMPILE+=" -fno-lifetime-dse -fno-delete-null-pointer-checks -std=gnu++98 -Wno-error"
-    '';
-
-    NIX_LDFLAGS= lib.optionals (!minimal) [
-      "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
-    ] ++ lib.optionals (!minimal && enableGnome2) [
-      "-lgtk-x11-2.0" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
-    ];
-
-    buildFlags = [ "all" ];
-
-    installPhase = ''
-      mkdir -p $out/lib/openjdk $out/share $jre/lib/openjdk
-
-      cp -av build/*/images/jdk/* $out/lib/openjdk
-
-      # Remove some broken manpages.
-      rm -rf $out/lib/openjdk/man/ja*
-
-      # Mirror some stuff in top-level.
-      mkdir $out/include $out/share/man
-      ln -s $out/lib/openjdk/include/* $out/include/
-      ln -s $out/lib/openjdk/man/* $out/share/man/
-
-      # jni.h expects jni_md.h to be in the header search path.
-      ln -s $out/include/linux/*_md.h $out/include/
-
-      # Copy the JRE to a separate output and setup fallback fonts
-      cp -av build/*/images/jre $jre/lib/openjdk/
-      mkdir $out/lib/openjdk/jre
-      ${lib.optionalString (!minimal) ''
-        mkdir -p $jre/lib/openjdk/jre/lib/fonts/fallback
-        lndir ${liberation_ttf}/share/fonts/truetype $jre/lib/openjdk/jre/lib/fonts/fallback
-      ''}
-
-      # Remove crap from the installation.
-      rm -rf $out/lib/openjdk/demo
-      ${lib.optionalString minimal ''
-        for d in $out/lib/openjdk/lib $jre/lib/openjdk/jre/lib; do
-          rm ''${d}/{libjsound,libjsoundalsa,libawt*,libfontmanager}.so
-        done
-      ''}
-
-      lndir $jre/lib/openjdk/jre $out/lib/openjdk/jre
-
-      # Make sure cmm/*.pf are not symlinks:
-      # https://youtrack.jetbrains.com/issue/IDEA-147272
-      # in 9, it seems no *.pf files end up in $out ... ?
-      # rm -rf $out/lib/openjdk/jre/lib/cmm
-      # ln -s {$jre,$out}/lib/openjdk/jre/lib/cmm
-
-      # Set PaX markings
-      exes=$(file $out/lib/openjdk/bin/* $jre/lib/openjdk/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
-      echo "to mark: *$exes*"
-      for file in $exes; do
-        echo "marking *$file*"
-        paxmark ${paxflags} "$file"
-      done
-
-      # Remove duplicate binaries.
-      for i in $(cd $out/lib/openjdk/bin && echo *); do
-        if [ "$i" = java ]; then continue; fi
-        if cmp -s $out/lib/openjdk/bin/$i $jre/lib/openjdk/jre/bin/$i; then
-          ln -sfn $jre/lib/openjdk/jre/bin/$i $out/lib/openjdk/bin/$i
-        fi
-      done
-
-      # Generate certificates.
-      (
-        cd $jre/lib/openjdk/jre/lib/security
-        rm cacerts
-        perl ${./generate-cacerts.pl} $jre/lib/openjdk/jre/bin/keytool ${cacert}/etc/ssl/certs/ca-bundle.crt
-      )
-
-      ln -s $out/lib/openjdk/bin $out/bin
-      ln -s $jre/lib/openjdk/jre/bin $jre/bin
-      ln -s $jre/lib/openjdk/jre $out/jre
-    '';
-
-    # FIXME: this is unnecessary once the multiple-outputs branch is merged.
-    preFixup = ''
-      prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}"
-      patchELF $jre
-      propagatedBuildInputs+=" $jre"
-
-      # Propagate the setJavaClassPath setup hook from the JRE so that
-      # any package that depends on the JRE has $CLASSPATH set up
-      # properly.
-      mkdir -p $jre/nix-support
-      #TODO or printWords?  cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
-      echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-build-inputs
-
-      # Set JAVA_HOME automatically.
-      mkdir -p $out/nix-support
-      cat <<EOF > $out/nix-support/setup-hook
-      if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out/lib/openjdk; fi
-      EOF
-    '';
-
-    postFixup = ''
-      # Build the set of output library directories to rpath against
-      LIBDIRS=""
-      for output in $outputs; do
-        LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort | uniq | tr '\n' ':'):$LIBDIRS"
-      done
-
-      # Add the local library paths to remove dependencies on the bootstrap
-      for output in $outputs; do
-        OUTPUTDIR=$(eval echo \$$output)
-        BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
-        echo "$BINLIBS" | while read i; do
-          patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true
-          patchelf --shrink-rpath "$i" || true
-        done
-      done
-
-      # Test to make sure that we don't depend on the bootstrap
-      for output in $outputs; do
-        if grep -q -r '${bootjdk}' $(eval echo \$$output); then
-          echo "Extraneous references to ${bootjdk} detected"
-          exit 1
-        fi
-      done
-    '';
-
-    meta = with stdenv.lib; {
-      homepage = http://openjdk.java.net/;
-      license = licenses.gpl2;
-      description = "The open-source Java Development Kit";
-      maintainers = with maintainers; [ edwtjo ];
-      platforms = platforms.linux;
-    };
-
-    passthru = {
-      inherit architecture;
-      home = "${openjdk9}/lib/openjdk";
-    };
-  };
-in openjdk9
diff --git a/pkgs/development/compilers/openjdk/bootstrap.nix b/pkgs/development/compilers/openjdk/bootstrap.nix
index 668ca552adf1..3c29df7ec78e 100644
--- a/pkgs/development/compilers/openjdk/bootstrap.nix
+++ b/pkgs/development/compilers/openjdk/bootstrap.nix
@@ -1,5 +1,5 @@
 { stdenv
-, runCommand, fetchurl, file
+, runCommand, fetchurl, file, zlib
 
 , version
 }:
@@ -7,30 +7,19 @@
 assert stdenv.hostPlatform.libc == "glibc";
 
 let
-  # !!! These should be on nixos.org
+  fetchboot = version: arch: sha256: fetchurl {
+    name = "openjdk${version}-bootstrap-${arch}-linux.tar.xz";
+    url  = "http://tarballs.nixos.org/openjdk/2018-03-31/${version}/${arch}-linux.tar.xz";
+    inherit sha256;
+  };
+
   src = if stdenv.hostPlatform.system == "x86_64-linux" then
-    (if version == "8" then
-      fetchurl {
-        url = "https://www.dropbox.com/s/a0lsq2ig4uguky5/openjdk8-bootstrap-x86_64-linux.tar.xz?dl=1";
-        sha256 = "18zqx6jhm3lizn9hh6ryyqc9dz3i96pwaz8f6nxfllk70qi5gvks";
-      }
-    else if version == "7" then
-      fetchurl {
-        url = "https://www.dropbox.com/s/rssfbeommrfbsjf/openjdk7-bootstrap-x86_64-linux.tar.xz?dl=1";
-        sha256 = "024gg2sgg4labxbc1nhn8lxls2p7d9h3b82hnsahwaja2pm1hbra";
-      }
+    (if version == "10"    then fetchboot "10" "x86_64" "08085fsxc1qhqiv3yi38w8lrg3vm7s0m2yvnwr1c92v019806yq2"
+    else if version == "8" then fetchboot "8"  "x86_64" "18zqx6jhm3lizn9hh6ryyqc9dz3i96pwaz8f6nxfllk70qi5gvks"
     else throw "No bootstrap for version")
   else if stdenv.hostPlatform.system == "i686-linux" then
-    (if version == "8" then
-      fetchurl {
-        url = "https://www.dropbox.com/s/rneqjhlerijsw74/openjdk8-bootstrap-i686-linux.tar.xz?dl=1";
-        sha256 = "1yx04xh8bqz7amg12d13rw5vwa008rav59mxjw1b9s6ynkvfgqq9";
-      }
-    else if version == "7" then
-      fetchurl {
-        url = "https://www.dropbox.com/s/6xe64td7eg2wurs/openjdk7-bootstrap-i686-linux.tar.xz?dl=1";
-        sha256 = "0xwqjk1zx8akziw8q9sbjc1rs8s7c0w6mw67jdmmi26cwwp8ijnx";
-      }
+    (if version == "10"    then fetchboot "10" "i686" "1blb9gyzp8gfyggxvggqgpcgfcyi00ndnnskipwgdm031qva94p7"
+    else if version == "8" then fetchboot "8"  "i686" "1yx04xh8bqz7amg12d13rw5vwa008rav59mxjw1b9s6ynkvfgqq9"
     else throw "No bootstrap for version")
   else throw "No bootstrap for system";
 
@@ -45,7 +34,7 @@ let
     find "$out" -type f -print0 | while IFS= read -r -d "" elf; do
       isELF "$elf" || continue
       patchelf --set-interpreter $(cat "${stdenv.cc}/nix-support/dynamic-linker") "$elf" || true
-      patchelf --set-rpath "${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib:$LIBDIRS" "$elf" || true
+      patchelf --set-rpath "${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib:${zlib}/lib:$LIBDIRS" "$elf" || true
     done
 
     # Temporarily, while NixOS's OpenJDK bootstrap tarball doesn't have PaX markings:
diff --git a/pkgs/development/compilers/openjdk/cppflags-include-fix.patch b/pkgs/development/compilers/openjdk/cppflags-include-fix.patch
deleted file mode 100644
index 8931c122538f..000000000000
--- a/pkgs/development/compilers/openjdk/cppflags-include-fix.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -Naur openjdk-orig/jdk/make/sun/awt/mawt.gmk openjdk/jdk/make/sun/awt/mawt.gmk
---- openjdk-orig/jdk/make/sun/awt/mawt.gmk	2012-08-28 19:13:16.000000000 -0400
-+++ openjdk/jdk/make/sun/awt/mawt.gmk	2013-01-22 11:56:22.315418708 -0500
-@@ -234,12 +234,6 @@
- endif # !HEADLESS
- endif # PLATFORM
- 
--ifeq ($(PLATFORM), linux)
--  # Checking for the X11/extensions headers at the additional location
--  CPPFLAGS += -I$(firstword $(wildcard $(OPENWIN_HOME)/include/X11/extensions) \
--                        $(wildcard /usr/include/X11/extensions))
--endif
--
- ifeq ($(PLATFORM), macosx))
-   CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
-               -I$(OPENWIN_HOME)/include 
diff --git a/pkgs/development/compilers/openjdk/currency-date-range.patch b/pkgs/development/compilers/openjdk/currency-date-range.patch
deleted file mode 100644
index b1c461591d1e..000000000000
--- a/pkgs/development/compilers/openjdk/currency-date-range.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Naur openjdk-7u65-b32-upstream/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java openjdk-7u65-b32/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
---- openjdk-7u65-b32-upstream/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	2014-07-17 05:42:14.000000000 -0430
-+++ openjdk-7u65-b32/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java	2014-12-30 10:15:50.327905933 -0430
-@@ -281,8 +281,8 @@
-             checkCurrencyCode(newCurrency);
-             String timeString = currencyInfo.substring(4, length - 4);
-             long time = format.parse(timeString).getTime();
--            if (Math.abs(time - System.currentTimeMillis()) > ((long) 10) * 365 * 24 * 60 * 60 * 1000) {
--                throw new RuntimeException("time is more than 10 years from present: " + time);
-+            if (Math.abs(time - System.currentTimeMillis()) > ((long) 20) * 365 * 24 * 60 * 60 * 1000) {
-+                throw new RuntimeException("time is more than 20 years from present: " + time);
-             }
-             specialCaseCutOverTimes[specialCaseCount] = time;
-             specialCaseOldCurrencies[specialCaseCount] = oldCurrency;
diff --git a/pkgs/development/compilers/openjdk/fix-java-home-jdk9.patch b/pkgs/development/compilers/openjdk/fix-java-home-jdk9.patch
deleted file mode 100644
index f9755d58e48f..000000000000
--- a/pkgs/development/compilers/openjdk/fix-java-home-jdk9.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/hotspot/src/os/linux/vm/os_linux.cpp	2017-07-04 23:09:02.533972226 -0400
-+++ b/hotspot/src/os/linux/vm/os_linux.cpp	2017-07-04 23:07:52.118338845 -0400
-@@ -2318,10 +2318,7 @@
-   assert(ret, "cannot locate libjvm");
-   char *rp = NULL;
-   if (ret && dli_fname[0] != '\0') {
--    rp = realpath(dli_fname, buf);
--  }
--  if (rp == NULL) {
--    return;
-+    snprintf(buf, buflen, "%s", dli_fname);
-   }
- 
-   if (Arguments::sun_java_launcher_is_altjvm()) {
diff --git a/pkgs/development/compilers/openjdk/fix-java-home.patch b/pkgs/development/compilers/openjdk/fix-java-home.patch
deleted file mode 100644
index 5def344f1717..000000000000
--- a/pkgs/development/compilers/openjdk/fix-java-home.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -ru -x '*~' openjdk-orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
---- openjdk-orig/hotspot/src/os/linux/vm/os_linux.cpp	2013-09-06 20:22:03.000000000 +0200
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2014-01-24 22:44:08.223857012 +0100
-@@ -2358,12 +2358,10 @@
-                 CAST_FROM_FN_PTR(address, os::jvm_path),
-                 dli_fname, sizeof(dli_fname), NULL);
-   assert(ret, "cannot locate libjvm");
-   char *rp = NULL;
-   if (ret && dli_fname[0] != '\0') {
--    rp = realpath(dli_fname, buf);
-+    snprintf(buf, buflen, "%s", dli_fname);
-   }
--  if (rp == NULL)
--    return;
- 
-   if (Arguments::created_by_gamma_launcher()) {
-     // Support for the gamma launcher.  Typical value for buf is
diff --git a/pkgs/development/compilers/openjdk/paxctl.patch b/pkgs/development/compilers/openjdk/paxctl.patch
deleted file mode 100644
index 12528a601cc8..000000000000
--- a/pkgs/development/compilers/openjdk/paxctl.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/hotspot/make/linux/makefiles/launcher.make b/hotspot/make/linux/makefiles/launcher.make
-index 34bbcd6..41b9332 100644
---- a/hotspot/make/linux/makefiles/launcher.make
-+++ b/hotspot/make/linux/makefiles/launcher.make
-@@ -83,6 +83,8 @@ $(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
- 	$(QUIETLY) echo Linking launcher...
- 	$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
- 	$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
-+	paxctl -c $(LAUNCHER)
-+	paxctl -zex -XXX_PAXFLAGS_XXX $(LAUNCHER)
- 	$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
- 
- $(LAUNCHER): $(LAUNCHER_SCRIPT)
-diff --git a/jdk/make/common/Program.gmk b/jdk/make/common/Program.gmk
-index 091800d..1de8cb4 100644
---- a/jdk/make/common/Program.gmk
-+++ b/jdk/make/common/Program.gmk
-@@ -60,6 +60,10 @@ ACTUAL_PROGRAM      = $(ACTUAL_PROGRAM_DIR)/$(ACTUAL_PROGRAM_NAME)
- program_default_rule: all
- 
- program: $(ACTUAL_PROGRAM)
-+	if [[ "$(PROGRAM)" = "java" ]]; then \
-+		paxctl -c $(ACTUAL_PROGRAM); \
-+		paxctl -zex -XXX_PAXFLAGS_XXX $(ACTUAL_PROGRAM); \
-+	fi
- 
- # Work-around for missing processor specific mapfiles
- ifndef CROSS_COMPILE_ARCH
diff --git a/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk9.patch b/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk9.patch
deleted file mode 100644
index cb8d59ff8063..000000000000
--- a/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk9.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/jdk/src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java	2017-06-26 21:48:25.000000000 -0400
-+++ b/jdk/src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java.new	2017-07-05 20:45:57.491295030 -0400
-@@ -71,6 +71,7 @@
-      *
-      * The preference of the default trusted KeyStore is:
-      *    javax.net.ssl.trustStore
-+     *    system environment variable JAVAX_NET_SSL_TRUSTSTORE
-      *    jssecacerts
-      *    cacerts
-      */
-@@ -144,6 +145,9 @@
-                     String temporaryName = "";
-                     File temporaryFile = null;
-                     long temporaryTime = 0L;
-+                    if (storePropName == null){
-+                        storePropName = System.getenv("JAVAX_NET_SSL_TRUSTSTORE");
-+                    }
-                     if (!"NONE".equals(storePropName)) {
-                         String[] fileNames =
-                                 new String[] {storePropName, defaultStore};
diff --git a/pkgs/development/compilers/openjdk/read-truststore-from-env.patch b/pkgs/development/compilers/openjdk/read-truststore-from-env.patch
deleted file mode 100644
index 8fb0f409d0ab..000000000000
--- a/pkgs/development/compilers/openjdk/read-truststore-from-env.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -ur openjdk-7u65-b32/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java openjdk-7u65-b32.new/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
---- openjdk-7u65-b32/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java	2014-07-17 12:12:14.000000000 +0200
-+++ openjdk-7u65-b32.new/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java	2014-12-09 13:31:27.821960372 +0100
-@@ -158,6 +158,7 @@
-         /*
-          * Try:
-          *      javax.net.ssl.trustStore  (if this variable exists, stop)
-+         *      system environment variable JAVAX_NET_SSL_TRUSTSTORE
-          *      jssecacerts
-          *      cacerts
-          *
-@@ -165,6 +166,9 @@
-          */
- 
-         storeFileName = props.get("trustStore");
-+        if (storeFileName == null) {
-+            storeFileName = System.getenv("JAVAX_NET_SSL_TRUSTSTORE");
-+        }
-         if (!"NONE".equals(storeFileName)) {
-             if (storeFileName != null) {
-                 storeFile = new File(storeFileName);
diff --git a/pkgs/development/compilers/openjdk/swing-use-gtk.patch b/pkgs/development/compilers/openjdk/swing-use-gtk-jdk8.patch
index 9538aade6726..9538aade6726 100644
--- a/pkgs/development/compilers/openjdk/swing-use-gtk.patch
+++ b/pkgs/development/compilers/openjdk/swing-use-gtk-jdk8.patch
diff --git a/pkgs/development/compilers/openjdk/swing-use-gtk-jdk9.patch b/pkgs/development/compilers/openjdk/swing-use-gtk-jdk9.patch
deleted file mode 100644
index 07d95ba71b8a..000000000000
--- a/pkgs/development/compilers/openjdk/swing-use-gtk-jdk9.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -ru3 a/jdk/src/share/classes/javax/swing/UIManager.java b/jdk/src/share/classes/javax/swing/UIManager.java
---- a/jdk/src/java.desktop/share/classes/javax/swing/UIManager.java	2016-07-26 00:41:37.000000000 +0300
-+++ b/jdk/src/java.desktop/share/classes/javax/swing/UIManager.java	2016-10-02 22:46:01.890071761 +0300
-@@ -607,11 +607,9 @@
-         if (osType == OSInfo.OSType.WINDOWS) {
-             return "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
-         } else {
--            String desktop = AccessController.doPrivileged(new GetPropertyAction("sun.desktop"));
-             Toolkit toolkit = Toolkit.getDefaultToolkit();
--            if ("gnome".equals(desktop) &&
--                    toolkit instanceof SunToolkit &&
--                    ((SunToolkit) toolkit).isNativeGTKAvailable()) {
-+            if (toolkit instanceof SunToolkit &&
-+                    ((SunToolkit) toolkit).isNativeGTKAvailable()) {
-                 // May be set on Linux and Solaris boxs.
-                 return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
-             }
-@@ -1341,7 +1339,7 @@
-             lafName = (String) lafData.remove("defaultlaf");
-         }
-         if (lafName == null) {
--            lafName = getCrossPlatformLookAndFeelClassName();
-+            lafName = getSystemLookAndFeelClassName();
-         }
-         lafName = swingProps.getProperty(defaultLAFKey, lafName);
- 
diff --git a/pkgs/development/compilers/oraclejdk/jdk9-linux.nix b/pkgs/development/compilers/oraclejdk/jdk9-linux.nix
deleted file mode 100644
index 87f2e49b4431..000000000000
--- a/pkgs/development/compilers/oraclejdk/jdk9-linux.nix
+++ /dev/null
@@ -1,158 +0,0 @@
-{ swingSupport ? true
-, stdenv
-, requireFile
-, makeWrapper
-, unzip
-, file
-, xorg ? null
-, packageType ? "JDK" # JDK, JRE, or ServerJRE
-, pluginSupport ? true
-, glib
-, libxml2
-, ffmpeg_2
-, libxslt
-, libGL
-, freetype
-, fontconfig
-, gtk2
-, pango
-, cairo
-, alsaLib
-, atk
-, gdk_pixbuf
-, zlib
-, elfutils
-, setJavaClassPath
-}:
-
-assert stdenv.system == "x86_64-linux";
-assert swingSupport -> xorg != null;
-
-let
-  version = "9.0.4";
-
-  downloadUrlBase = http://www.oracle.com/technetwork/java/javase/downloads;
-
-  rSubPaths = [
-    "lib/jli"
-    "lib/server"
-    "lib"
-  ];
-
-in
-
-let result = stdenv.mkDerivation rec {
-  name = if packageType == "JDK"       then "oraclejdk-${version}"
-    else if packageType == "JRE"       then "oraclejre-${version}"
-    else if packageType == "ServerJRE" then "oracleserverjre-${version}"
-    else abort "unknown package Type ${packageType}";
-
-  src =
-    if packageType == "JDK" then
-      requireFile {
-        name = "jdk-${version}_linux-x64_bin.tar.gz";
-        url =  "${downloadUrlBase}/jdk9-downloads-3848520.html";
-        sha256 = "18nsjn64wkfmyb09wf2k7lvhazf83cs3dyichr038vl1gs3ymi4h";
-      }
-    else if packageType == "JRE" then
-      requireFile {
-        name = "jre-${version}_linux-x64_bin.tar.gz";
-        url = "${downloadUrlBase}/jre9-downloads-3848532.html";
-        sha256 = "01fp079mr04nniyf06w8vd47qxr6rly1lbh8dqkddb8fp9h6a79k";
-      }
-    else if packageType == "ServerJRE" then
-      requireFile {
-        name = "serverjre-${version}_linux-x64_bin.tar.gz";
-        url = "${downloadUrlBase}/server-jre9-downloads-3848530.html";
-        sha256 = "1jlpa4mn306hx0p9jcw3i6cpdvnng29dwjsymgcan56810q6p6yj";
-      }
-    else abort "unknown package Type ${packageType}";
-
-  nativeBuildInputs = [ file ];
-
-  buildInputs = [ makeWrapper ];
-
-  # See: https://github.com/NixOS/patchelf/issues/10
-  dontStrip = 1;
-
-  installPhase = ''
-    cd ..
-
-    # Set PaX markings
-    exes=$(file $sourceRoot/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
-    for file in $exes; do
-      paxmark m "$file"
-      # On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well.
-      ${stdenv.lib.optionalString stdenv.isi686 ''paxmark msp "$file"''}
-    done
-
-    mv $sourceRoot $out
-
-    shopt -s extglob
-    for file in $out/*
-    do
-      if test -f $file ; then
-        rm $file
-      fi
-    done
-
-    if test -z "$pluginSupport"; then
-      rm -f $out/bin/javaws
-    fi
-
-    mkdir $out/lib/plugins
-    ln -s $out/lib/libnpjp2.so $out/lib/plugins
-
-    # for backward compatibility
-    ln -s $out $out/jre
-
-    mkdir -p $out/nix-support
-    printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
-
-    # Set JAVA_HOME automatically.
-    cat <<EOF >> $out/nix-support/setup-hook
-    if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
-    EOF
-  '';
-
-  postFixup = ''
-    rpath+="''${rpath:+:}${stdenv.lib.concatStringsSep ":" (map (a: "$out/${a}") rSubPaths)}"
-
-    # set all the dynamic linkers
-    find $out -type f -perm -0100 \
-        -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-        --set-rpath "$rpath" {} \;
-
-    find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
-
-    # Oracle Java Mission Control needs to know where libgtk-x11 and related is
-    if test -x $out/bin/jmc; then
-      wrapProgram "$out/bin/jmc" \
-          --suffix-each LD_LIBRARY_PATH ':' "$rpath"
-    fi
-  '';
-
-  /**
-   * libXt is only needed on amd64
-   */
-  libraries =
-    [stdenv.cc.libc glib libxml2 ffmpeg_2 libxslt libGL xorg.libXxf86vm alsaLib fontconfig freetype pango gtk2 cairo gdk_pixbuf atk zlib elfutils] ++
-    (if swingSupport then [xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp xorg.libXt xorg.libXrender stdenv.cc.cc] else []);
-
-  rpath = stdenv.lib.strings.makeLibraryPath libraries;
-
-  passthru.mozillaPlugin = "/lib/plugins";
-
-  passthru.jre = result; # FIXME: use multiple outputs or return actual JRE package
-
-  passthru.home = result;
-
-  # for backward compatibility
-  passthru.architecture = "";
-
-  meta = with stdenv.lib; {
-    license = licenses.unfree;
-    platforms = [ "x86_64-linux" ]; # some inherit jre.meta.platforms
-  };
-
-}; in result
diff --git a/pkgs/development/compilers/purescript/psc-package/default.nix b/pkgs/development/compilers/purescript/psc-package/default.nix
index 451722aea060..2d8a051a811e 100644
--- a/pkgs/development/compilers/purescript/psc-package/default.nix
+++ b/pkgs/development/compilers/purescript/psc-package/default.nix
@@ -4,13 +4,13 @@ with lib;
 
 mkDerivation rec {
   pname = "psc-package";
-  version = "0.2.5";
+  version = "0.3.2-pre";
 
   src = fetchFromGitHub {
     owner = "purescript";
     repo = pname;
     rev = "v${version}";
-    sha256 = "15g0l8g8l6m5x4f73w68r9iav091x12b3wjxh0rx3ggnj093g6j1";
+    sha256 = "0vriyvq0mad3px4lhbqg6xrym2z6wnhr81101mx8cg1lgql1wgwk";
   };
 
   isLibrary = false;
diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index 39b84ae6a365..0da3e9f0fd1d 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -9,11 +9,11 @@
 
 stdenv.mkDerivation rec {
   name    = "sbcl-${version}";
-  version = "1.4.4";
+  version = "1.4.6";
 
   src = fetchurl {
     url    = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
-    sha256 = "1k6v5b8qv7vyxvh8asx6phf2hbapx5pp5p5j47hgnq123fwnh4fa";
+    sha256 = "0y46zgg3lamaqqhxbqmbwzvdakzvc9j07d0ci8f57pfl549v04a4";
   };
 
   patchPhase = ''
diff --git a/pkgs/development/compilers/swift/default.nix b/pkgs/development/compilers/swift/default.nix
index fc142a4026bd..abbfdd2abb72 100644
--- a/pkgs/development/compilers/swift/default.nix
+++ b/pkgs/development/compilers/swift/default.nix
@@ -37,7 +37,7 @@
 }:
 
 let
-  v_major = "4.0.3";
+  v_major = "4.1";
   version = "${v_major}-RELEASE";
   version_friendly = "${v_major}";
 
@@ -55,15 +55,15 @@ let
     # For more inforation, see: https://github.com/apple/swift/pull/3594#issuecomment-234169759
     clang = fetch {
       repo = "swift-clang";
-      sha256 = "0zm624iwiprk3c3nzqf4p1fd9zqic4yi3jv51cw3249ax4x6vy10";
+      sha256 = "0j8bi6jv4m4hqiib02q5cvnxd9j6bwiri853x6px86vai3mdff0h";
     };
     llvm = fetch {
       repo = "swift-llvm";
-      sha256 = "11vw6461c0cdvwm1wna1a5709fjj14hzp6br6jg94p4f6jp3yv4d";
+      sha256 = "03558f5zbchqvdabi3x9ahyz4xkmj7w69gazivz372832lgr9zfh";
     };
     compilerrt = fetch {
       repo = "swift-compiler-rt";
-      sha256 = "1hj4qaj4c9n2wzg2cvarbyl0n708zd1dlw4zkzq07fjxxqs36nfa";
+      sha256 = "1wkymmxi2v759xkwlzfrq9rivndjfvp6ikrzz10mvvrvyvrgwqnl";
     };
     cmark = fetch {
       repo = "swift-cmark";
@@ -71,32 +71,32 @@ let
     };
     lldb = fetch {
       repo = "swift-lldb";
-      sha256 = "0yk5qg85008vcn63vn2jpn5ls9pdhda222p2w1cfkrj27k5k8vqr";
+      sha256 = "09x3d3bc6rn9g6jpi3fb120c4r2carsmqla4bq4scjrs0867jz9m";
     };
     llbuild = fetch {
       repo = "swift-llbuild";
-      sha256 = "0jffw6z1s6ck1i05brw59x6vsg7zrxbz5n2wz72fj29rh3nppc7a";
+      sha256 = "04y0ihfyam2n671vmpk9gy0gb9lb3ivh6mr19862p5kg5bmrcic1";
     };
     pm = fetch {
       repo = "swift-package-manager";
-      sha256 = "0xj070b8fii7ijfsnyq4fxgv6569vdrg0yippi85h2p1l7s9aagh";
+      sha256 = "08d87fc29qq7m92jaxkiczsa7b567pwbibiwwkzdrj6a0gr11qn3";
     };
     xctest = fetch {
       repo = "swift-corelibs-xctest";
-      sha256 = "0l355wq8zfwrpv044xf4smjwbm0bmib360748n8cwls3vkr9l2yv";
+      sha256 = "1alkgxx8jsr2jjv2kchnjaaddb1byjwim015m1z3qxh6lknqm0k5";
     };
     foundation = fetch {
       repo = "swift-corelibs-foundation";
-      sha256 = "0s7yc5gsbd96a4bs8c6q24dyfjm4xhcr2nzhl2ics8dmi60j15s4";
+      sha256 = "06pbhb7wg4q5qgprhiyzbqy6hssga7xxjclhlh81gd6rvfd6bxvw";
     };
     libdispatch = fetch {
       repo = "swift-corelibs-libdispatch";
-      sha256 = "0x8zzq3shhvmhq4sbhaaa0ddiv3nw347pz6ayym6jyzq7j9n15ia";
+      sha256 = "198vskbajch8s168a649qz5an92i2mxmmmzcjlgxlzh38fgxri0n";
       fetchSubmodules = true;
     };
     swift = fetch {
       repo = "swift";
-      sha256 = "0a1gq0k5701i418f0qi7kywv16q7vh4a4wp0f6fpyv4sjkq27msx";
+      sha256 = "1flvr12bg8m4k44yq0xy9qrllv5rpxgxisjgbpakk5p3myfsx7ky";
     };
   };
 
@@ -132,19 +132,6 @@ let
       install_destdir=$SWIFT_INSTALL_DIR \
       extra_cmake_options="${stdenv.lib.concatStringsSep "," cmakeFlags}"'';
 
-  # from llvm/4/llvm.nix
-  sigaltstackPatch = fetchpatch {
-    name = "sigaltstack.patch"; # for glibc-2.26
-    url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
-    sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
-  };
-
-  # https://bugs.swift.org/browse/SR-6409
-  sigunusedPatch = fetchpatch {
-    name = "sigunused.patch";
-    url = "https://github.com/apple/swift-llbuild/commit/303a89bc6da606c115560921a452686aa0655f5e.diff";
-    sha256 = "04sw7ym1grzggj1v3xrzr2ljxz8rf9rnn9n5fg1xjbwlrdagkc7m";
-  };
 in
 stdenv.mkDerivation rec {
   name = "swift-${version_friendly}";
@@ -179,7 +166,7 @@ stdenv.mkDerivation rec {
 
   configurePhase = ''
     cd ..
-    
+
     export INSTALLABLE_PACKAGE=$PWD/swift.tar.gz
 
     mkdir build install
@@ -236,20 +223,18 @@ stdenv.mkDerivation rec {
   '' + ''
     patch -p1 -d swift -i ${./patches/0001-build-presets-linux-don-t-require-using-Ninja.patch}
     patch -p1 -d swift -i ${./patches/0002-build-presets-linux-allow-custom-install-prefix.patch}
-    patch -p1 -d swift -i ${./patches/0003-build-presets-linux-disable-tests.patch}
     patch -p1 -d swift -i ${./patches/0004-build-presets-linux-plumb-extra-cmake-options.patch}
-    # https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
-    patch -p1 -i ${./patches/remove_xlocale.patch}
-    # https://bugs.swift.org/browse/SR-4633
-    patch -p1 -d swift -i ${./patches/icu59.patch}
+
+    sed -i swift/utils/build-presets.ini \
+      -e 's/^test-installable-package$/# \0/' \
+      -e 's/^test$/# \0/' \
+      -e 's/^validation-test$/# \0/' \
+      -e 's/^long-test$/# \0/'
 
     # https://bugs.swift.org/browse/SR-5779
     sed -i -e 's|"-latomic"|"-Wl,-rpath,${clang.cc.gcc.lib}/lib" "-L${clang.cc.gcc.lib}/lib" "-latomic"|' swift/cmake/modules/AddSwift.cmake
 
-    # https://bugs.swift.org/browse/SR-4838
-    sed -i -e '30i#include <functional>' lldb/include/lldb/Utility/TaskPool.h
-
-    substituteInPlace clang/lib/Driver/ToolChains.cpp \
+    substituteInPlace clang/lib/Driver/ToolChains/Linux.cpp \
       --replace '  addPathIfExists(D, SysRoot + "/usr/lib", Paths);' \
                 '  addPathIfExists(D, SysRoot + "/usr/lib", Paths); addPathIfExists(D, "${glibc}/lib", Paths);'
     patch -p1 -d clang -i ${./purity.patch}
@@ -258,19 +243,15 @@ stdenv.mkDerivation rec {
     sed -i 's,curses,ncurses,' llbuild/*/*/CMakeLists.txt
 
     # This test fails on one of my machines, not sure why.
-    # Disabling for now. 
+    # Disabling for now.
     rm llbuild/tests/Examples/buildsystem-capi.llbuild
 
     PREFIX=''${out/#\/}
     substituteInPlace swift-corelibs-xctest/build_script.py \
       --replace usr "$PREFIX"
     substituteInPlace swiftpm/Utilities/bootstrap \
-      --replace "usr" "$PREFIX"
-  '' + stdenv.lib.optionalString (stdenv ? glibc) ''
-    patch -p1 -d compiler-rt -i ${sigaltstackPatch}
-    patch -p1 -d compiler-rt -i ${./patches/sigaltstack.patch}
-    patch -p1 -d llbuild -i ${sigunusedPatch}
-    patch -p1 -i ${./patches/sigunused.patch}
+      --replace \"usr\" \"$PREFIX\" \
+      --replace usr/lib "$PREFIX/lib"
   '';
 
   doCheck = false;
@@ -305,7 +286,8 @@ stdenv.mkDerivation rec {
     maintainers = with maintainers; [ dtzWill ];
     license = licenses.asl20;
     # Swift doesn't support 32bit Linux, unknown on other platforms.
-    platforms = [ "x86_64-linux" ];
+    platforms = platforms.linux;
+    badPlatforms = platforms.i686;
   };
 }
 
diff --git a/pkgs/development/compilers/swift/patches/0003-build-presets-linux-disable-tests.patch b/pkgs/development/compilers/swift/patches/0003-build-presets-linux-disable-tests.patch
deleted file mode 100644
index f647d9189dd2..000000000000
--- a/pkgs/development/compilers/swift/patches/0003-build-presets-linux-disable-tests.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From fcc7c216da6cd255f884b7aa39f361786e3afa6a Mon Sep 17 00:00:00 2001
-From: Will Dietz <w@wdtz.org>
-Date: Tue, 28 Mar 2017 15:02:18 -0500
-Subject: [PATCH 3/4] build-presets: (linux) disable tests.
-
----
- utils/build-presets.ini | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/utils/build-presets.ini b/utils/build-presets.ini
-index 1095cbaab7..1739e91dc2 100644
---- a/utils/build-presets.ini
-+++ b/utils/build-presets.ini
-@@ -700,7 +700,7 @@ build-swift-stdlib-unittest-extra
- 
- # Executes the lit tests for the installable package that is created
- # Assumes the swift-integration-tests repo is checked out
--test-installable-package
-+# test-installable-package
- 
- # Path to the root of the installation filesystem.
- install-destdir=%(install_destdir)s
-@@ -713,9 +713,9 @@ mixin-preset=mixin_linux_installation
- build-subdir=buildbot_linux
- lldb
- release
--test
--validation-test
--long-test
-+#test
-+#validation-test
-+#long-test
- foundation
- libdispatch
- lit-args=-v
--- 
-2.12.2
-
diff --git a/pkgs/development/compilers/swift/patches/icu59.patch b/pkgs/development/compilers/swift/patches/icu59.patch
deleted file mode 100644
index 26337814cafa..000000000000
--- a/pkgs/development/compilers/swift/patches/icu59.patch
+++ /dev/null
@@ -1,113 +0,0 @@
---- a/stdlib/public/stubs/UnicodeNormalization.cpp
-+++ b/stdlib/public/stubs/UnicodeNormalization.cpp
-@@ -86,11 +86,8 @@ ASCIICollation() {
-     for (unsigned char c = 0; c < 128; ++c) {
-       UErrorCode ErrorCode = U_ZERO_ERROR;
-       intptr_t NumCollationElts = 0;
--#if defined(__CYGWIN__) || defined(_MSC_VER)
-       UChar Buffer[1];
--#else
--      uint16_t Buffer[1];
--#endif
-+
-       Buffer[0] = c;
- 
-       UCollationElements *CollationIterator =
-@@ -127,18 +124,9 @@ swift::_swift_stdlib_unicode_compare_utf16_utf16(const uint16_t *LeftString,
-                                                  int32_t LeftLength,
-                                                  const uint16_t *RightString,
-                                                  int32_t RightLength) {
--#if defined(__CYGWIN__) || defined(_MSC_VER)
--  // ICU UChar type is platform dependent. In Cygwin, it is defined
--  // as wchar_t which size is 2. It seems that the underlying binary
--  // representation is same with swift utf16 representation.
-   return ucol_strcoll(GetRootCollator(),
-     reinterpret_cast<const UChar *>(LeftString), LeftLength,
-     reinterpret_cast<const UChar *>(RightString), RightLength);
--#else
--  return ucol_strcoll(GetRootCollator(),
--    LeftString, LeftLength,
--    RightString, RightLength);
--#endif
- }
- 
- /// Compares the strings via the Unicode Collation Algorithm on the root locale.
-@@ -156,12 +144,8 @@ swift::_swift_stdlib_unicode_compare_utf8_utf16(const unsigned char *LeftString,
-   UErrorCode ErrorCode = U_ZERO_ERROR;
- 
-   uiter_setUTF8(&LeftIterator, reinterpret_cast<const char *>(LeftString), LeftLength);
--#if defined(__CYGWIN__) || defined(_MSC_VER)
-   uiter_setString(&RightIterator, reinterpret_cast<const UChar *>(RightString),
-                   RightLength);
--#else
--  uiter_setString(&RightIterator, RightString, RightLength);
--#endif
- 
-   uint32_t Diff = ucol_strcollIter(GetRootCollator(),
-     &LeftIterator, &RightIterator, &ErrorCode);
-@@ -199,14 +183,10 @@ swift::_swift_stdlib_unicode_compare_utf8_utf8(const unsigned char *LeftString,
- void *swift::_swift_stdlib_unicodeCollationIterator_create(
-     const __swift_uint16_t *Str, __swift_uint32_t Length) {
-   UErrorCode ErrorCode = U_ZERO_ERROR;
--#if defined(__CYGWIN__) || defined(_MSC_VER)
-   UCollationElements *CollationIterator = ucol_openElements(
-     GetRootCollator(), reinterpret_cast<const UChar *>(Str), Length,
-     &ErrorCode);
--#else
--  UCollationElements *CollationIterator = ucol_openElements(
--    GetRootCollator(), Str, Length, &ErrorCode);
--#endif
-+
-   if (U_FAILURE(ErrorCode)) {
-     swift::crash("_swift_stdlib_unicodeCollationIterator_create: ucol_openElements() failed.");
-   }
-@@ -244,17 +224,12 @@ swift::_swift_stdlib_unicode_strToUpper(uint16_t *Destination,
-                                         const uint16_t *Source,
-                                         int32_t SourceLength) {
-   UErrorCode ErrorCode = U_ZERO_ERROR;
--#if defined(__CYGWIN__) || defined(_MSC_VER)
-   uint32_t OutputLength = u_strToUpper(reinterpret_cast<UChar *>(Destination),
-                                        DestinationCapacity,
-                                        reinterpret_cast<const UChar *>(Source),
-                                        SourceLength,
-                                        "", &ErrorCode);
--#else
--  uint32_t OutputLength = u_strToUpper(Destination, DestinationCapacity,
--                                       Source, SourceLength,
--                                       "", &ErrorCode);
--#endif
-+
-   if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) {
-     swift::crash("u_strToUpper: Unexpected error uppercasing unicode string.");
-   }
-@@ -271,17 +246,12 @@ swift::_swift_stdlib_unicode_strToLower(uint16_t *Destination,
-                                         const uint16_t *Source,
-                                         int32_t SourceLength) {
-   UErrorCode ErrorCode = U_ZERO_ERROR;
--#if defined(__CYGWIN__) || defined(_MSC_VER)
-   uint32_t OutputLength = u_strToLower(reinterpret_cast<UChar *>(Destination),
-                                        DestinationCapacity,
-                                        reinterpret_cast<const UChar *>(Source),
-                                        SourceLength,
-                                        "", &ErrorCode);
--#else
--  uint32_t OutputLength = u_strToLower(Destination, DestinationCapacity,
--                                       Source, SourceLength,
--                                       "", &ErrorCode);
--#endif
-+
-   if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) {
-     swift::crash("u_strToLower: Unexpected error lowercasing unicode string.");
-   }
-@@ -300,9 +300,9 @@
- 
- swift::__swift_stdlib_UBreakIterator *swift::__swift_stdlib_ubrk_open(
-     swift::__swift_stdlib_UBreakIteratorType type, const char *locale,
--    const UChar *text, int32_t textLength, __swift_stdlib_UErrorCode *status) {
-+    const __swift_stdlib_UChar * text, __swift_int32_t textLength, __swift_stdlib_UErrorCode *status) {
-   return ptr_cast<swift::__swift_stdlib_UBreakIterator>(
--      ubrk_open(static_cast<UBreakIteratorType>(type), locale, text, textLength,
-+      ubrk_open(static_cast<UBreakIteratorType>(type), locale, reinterpret_cast<const UChar *>(text), textLength,
-                 ptr_cast<UErrorCode>(status)));
- }
- 
diff --git a/pkgs/development/compilers/swift/patches/remove_xlocale.patch b/pkgs/development/compilers/swift/patches/remove_xlocale.patch
deleted file mode 100644
index 8ef7e3916962..000000000000
--- a/pkgs/development/compilers/swift/patches/remove_xlocale.patch
+++ /dev/null
@@ -1,54 +0,0 @@
---- a/swift/stdlib/public/SDK/os/os_trace_blob.c
-+++ b/swift/stdlib/public/SDK/os/os_trace_blob.c
-@@ -14,7 +14,6 @@
- #include <dispatch/dispatch.h>
- #include <os/base.h>
- #include <os/log.h>
--#include <xlocale.h>
- #include "os_trace_blob.h"
- 
- OS_NOINLINE
-
---- a/swift/stdlib/public/stubs/Stubs.cpp
-+++ b/swift/stdlib/public/stubs/Stubs.cpp
-@@ -61,7 +61,6 @@
- #define strtof_l swift_strtof_l
- #define strtold_l swift_strtold_l
- #else
--#include <xlocale.h>
- #endif
- #include <limits>
- #include "llvm/ADT/StringExtras.h"
-
---- a/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringDefaultEncoding.h
-+++ b/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringDefaultEncoding.h
-@@ -20,7 +20,6 @@
- #include <unistd.h>
- #include <string.h>
- #include <stdio.h>
--#include <xlocale.h>
- 
- CF_EXTERN_C_BEGIN
- 
-
---- a/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringEncodings.c
-+++ b/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringEncodings.c
-@@ -24,7 +24,6 @@
- #include <unistd.h>
- #include <string.h>
- #include <stdio.h>
--#include <xlocale.h>
- #include <CoreFoundation/CFStringDefaultEncoding.h>
- #endif
- 
-
---- a/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h
-+++ b/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h
-@@ -95,7 +95,6 @@
- #if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI || DEPLOYMENT_TARGET_LINUX || DEPLOYMENT_TARGET_FREEBSD
- #if TARGET_OS_CYGWIN
- #else
--#include <xlocale.h>
- #endif
- #include <unistd.h>
- #include <sys/time.h>
diff --git a/pkgs/development/compilers/swift/patches/sigaltstack.patch b/pkgs/development/compilers/swift/patches/sigaltstack.patch
deleted file mode 100644
index c529fa3777b3..000000000000
--- a/pkgs/development/compilers/swift/patches/sigaltstack.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/lib/esan/esan_sideline_linux.cpp
-+++ b/lib/esan/esan_sideline_linux.cpp
-@@ -70,7 +70,7 @@ int SidelineThread::runSideline(void *Arg) {
- 
-   // Set up a signal handler on an alternate stack for safety.
-   InternalScopedBuffer<char> StackMap(SigAltStackSize);
--  struct sigaltstack SigAltStack;
-+  stack_t SigAltStack;
-   SigAltStack.ss_sp = StackMap.data();
-   SigAltStack.ss_size = SigAltStackSize;
-   SigAltStack.ss_flags = 0;
diff --git a/pkgs/development/compilers/swift/patches/sigunused.patch b/pkgs/development/compilers/swift/patches/sigunused.patch
deleted file mode 100644
index 2701d1a3ae25..000000000000
--- a/pkgs/development/compilers/swift/patches/sigunused.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/swiftpm/Sources/Basic/Process.swift
-+++ b/swiftpm/Sources/Basic/Process.swift
-@@ -258,7 +258,7 @@ public func launch() throws {
-         // modify, so we have to take care about the set we use.
-         var mostSignals = sigset_t()
-         sigemptyset(&mostSignals)
--        for i in 1 ..< SIGUNUSED {
-+        for i in 1 ..< SIGSYS {
-             if i == SIGKILL || i == SIGSTOP {
-                 continue
-             }
diff --git a/pkgs/development/compilers/swift/purity.patch b/pkgs/development/compilers/swift/purity.patch
index f5fb4c73af47..b30d0d0b5d5b 100644
--- a/pkgs/development/compilers/swift/purity.patch
+++ b/pkgs/development/compilers/swift/purity.patch
@@ -1,6 +1,17 @@
---- a/lib/Driver/Tools.cpp	2016-08-25 15:48:05.187553443 +0200
-+++ b/lib/Driver/Tools.cpp	2016-08-25 15:48:47.534468882 +0200
-@@ -9420,13 +9420,6 @@
+From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Thu, 18 May 2017 11:56:12 -0500
+Subject: [PATCH] "purity" patch for 5.0
+
+---
+ lib/Driver/ToolChains/Gnu.cpp | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
+index fe3c0191bb..c6a482bece 100644
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
    if (!Args.hasArg(options::OPT_static)) {
      if (Args.hasArg(options::OPT_rdynamic))
        CmdArgs.push_back("-export-dynamic");
@@ -14,3 +25,6 @@
    }
  
    CmdArgs.push_back("-o");
+-- 
+2.11.0
+