summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/androidndk-pkgs/androidndk-pkgs.nix12
-rwxr-xr-xpkgs/development/compilers/adoptopenjdk-bin/generate-sources.py30
-rw-r--r--pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix3
-rw-r--r--pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix76
-rw-r--r--pkgs/development/compilers/adoptopenjdk-bin/jdk8-darwin.nix9
-rw-r--r--pkgs/development/compilers/adoptopenjdk-bin/jdk8-linux.nix9
-rw-r--r--pkgs/development/compilers/adoptopenjdk-bin/sources.json194
-rw-r--r--pkgs/development/compilers/binaryen/default.nix2
-rw-r--r--pkgs/development/compilers/ccl/default.nix2
-rw-r--r--pkgs/development/compilers/crystal/default.nix28
-rw-r--r--pkgs/development/compilers/dmd/default.nix2
-rw-r--r--pkgs/development/compilers/elm/packages/node-composition.nix2
-rw-r--r--pkgs/development/compilers/ghc/8.2.2-binary.nix10
-rw-r--r--pkgs/development/compilers/ghc/8.6.3-binary.nix6
-rw-r--r--pkgs/development/compilers/go/1.11.nix14
-rw-r--r--pkgs/development/compilers/go/1.12.nix14
-rw-r--r--pkgs/development/compilers/go/1.4.nix2
-rw-r--r--pkgs/development/compilers/julia/shared.nix4
-rw-r--r--pkgs/development/compilers/mozart/binary.nix4
-rw-r--r--pkgs/development/compilers/openjdk/005_enable-infinality.patch35
-rw-r--r--pkgs/development/compilers/openjdk/11.nix118
-rw-r--r--pkgs/development/compilers/openjdk/8.nix166
-rw-r--r--pkgs/development/compilers/openjdk/default.nix116
-rw-r--r--pkgs/development/compilers/openjdk/openjfx/11.nix37
-rw-r--r--pkgs/development/compilers/openjdk/openjfx/12.nix37
-rw-r--r--pkgs/development/compilers/openjdk/read-truststore-from-env-jdk8.patch51
-rw-r--r--pkgs/development/compilers/rust/bootstrap.nix2
-rw-r--r--pkgs/development/coq-modules/QuickChick/default.nix2
-rw-r--r--pkgs/development/coq-modules/Velisarios/default.nix2
-rw-r--r--pkgs/development/coq-modules/bignums/default.nix2
-rw-r--r--pkgs/development/coq-modules/category-theory/default.nix2
-rw-r--r--pkgs/development/coq-modules/contribs/default.nix4
-rw-r--r--pkgs/development/coq-modules/coq-elpi/default.nix2
-rw-r--r--pkgs/development/coq-modules/coq-ext-lib/default.nix2
-rw-r--r--pkgs/development/coq-modules/coq-haskell/default.nix2
-rw-r--r--pkgs/development/coq-modules/coqhammer/default.nix2
-rw-r--r--pkgs/development/coq-modules/coqprime/default.nix2
-rw-r--r--pkgs/development/coq-modules/dpdgraph/default.nix2
-rw-r--r--pkgs/development/coq-modules/equations/default.nix2
-rw-r--r--pkgs/development/coq-modules/ltac2/default.nix2
-rw-r--r--pkgs/development/coq-modules/mathcomp/default.nix6
-rw-r--r--pkgs/development/coq-modules/mathcomp/extra.nix12
-rw-r--r--pkgs/development/coq-modules/paramcoq/default.nix2
-rw-r--r--pkgs/development/interpreters/acl2/default.nix4
-rw-r--r--pkgs/development/interpreters/ruby/default.nix2
-rw-r--r--pkgs/development/libraries/SDL2/default.nix4
-rw-r--r--pkgs/development/libraries/SDL2/find-headers.patch3
-rw-r--r--pkgs/development/libraries/at-spi2-core/default.nix17
-rw-r--r--pkgs/development/libraries/fflas-ffpack/default.nix16
-rw-r--r--pkgs/development/libraries/ffmpeg/generic.nix6
-rw-r--r--pkgs/development/libraries/g2o/default.nix16
-rw-r--r--pkgs/development/libraries/givaro/default.nix16
-rw-r--r--pkgs/development/libraries/glib/default.nix4
-rw-r--r--pkgs/development/libraries/gsl/default.nix4
-rw-r--r--pkgs/development/libraries/java/swt/default.nix6
-rw-r--r--pkgs/development/libraries/kde-frameworks/default.nix2
-rw-r--r--pkgs/development/libraries/libdrm/default.nix25
-rw-r--r--pkgs/development/libraries/libgee/default.nix4
-rw-r--r--pkgs/development/libraries/libglvnd/default.nix7
-rw-r--r--pkgs/development/libraries/libheif/1.4.0-CVE-2019-11471.patch15
-rw-r--r--pkgs/development/libraries/libheif/default.nix6
-rw-r--r--pkgs/development/libraries/libical/default.nix52
-rw-r--r--pkgs/development/libraries/linbox/default.nix16
-rw-r--r--pkgs/development/libraries/mesa/default.nix4
-rw-r--r--pkgs/development/libraries/ocl-icd/default.nix8
-rw-r--r--pkgs/development/libraries/openssl/default.nix8
-rw-r--r--pkgs/development/libraries/oracle-instantclient/default.nix6
-rw-r--r--pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh2
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtbase.nix16
-rw-r--r--pkgs/development/libraries/qt-5/qtModule.nix6
-rw-r--r--pkgs/development/libraries/science/math/tensorflow/binary-hashes.nix6
-rw-r--r--pkgs/development/libraries/v8/5_x.nix4
-rw-r--r--pkgs/development/libraries/v8/default.nix2
-rw-r--r--pkgs/development/libraries/v8/plv8_6_x.nix4
-rw-r--r--pkgs/development/libraries/vulkan-loader/default.nix8
-rw-r--r--pkgs/development/libraries/wavpack/default.nix10
-rw-r--r--pkgs/development/libraries/wayland/protocols.nix4
-rw-r--r--pkgs/development/mobile/androidenv/compose-android-packages.nix12
-rw-r--r--pkgs/development/mobile/androidenv/tools.nix4
-rw-r--r--pkgs/development/node-packages/composition-v10.nix2
-rw-r--r--pkgs/development/node-packages/composition-v12.nix2
-rw-r--r--pkgs/development/ocaml-modules/labltk/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/lwt/legacy.nix2
-rw-r--r--pkgs/development/python-modules/numpy/default.nix6
-rw-r--r--pkgs/development/python-modules/spacy/models.nix2
-rw-r--r--pkgs/development/ruby-modules/bundled-common/default.nix4
-rw-r--r--pkgs/development/ruby-modules/bundled-common/functions.nix12
-rw-r--r--pkgs/development/ruby-modules/bundler-env/default.nix2
-rw-r--r--pkgs/development/tools/build-managers/bazel/default.nix8
-rw-r--r--pkgs/development/tools/build-managers/meson/default.nix10
-rw-r--r--pkgs/development/tools/misc/help2man/default.nix4
-rw-r--r--pkgs/development/tools/misc/kibana/5.x.nix12
-rw-r--r--pkgs/development/tools/misc/kibana/6.x.nix10
-rw-r--r--pkgs/development/tools/misc/kibana/7.x.nix10
-rw-r--r--pkgs/development/tools/ocaml/camlp4/default.nix2
-rw-r--r--pkgs/development/tools/ocaml/js_of_ocaml/default.nix2
-rw-r--r--pkgs/development/tools/selenium/chromedriver/default.nix6
-rw-r--r--pkgs/development/tools/tora/default.nix34
-rw-r--r--pkgs/development/web/remarkjs/nodepkgs.nix2
99 files changed, 799 insertions, 697 deletions
diff --git a/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix b/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix
index fcdd2eb5181..02aa6567c1a 100644
--- a/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix
+++ b/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix
@@ -12,31 +12,31 @@ let
   # than we do. We don't just use theirs because ours are less ambiguous and
   # some builds need that clarity.
   ndkInfoFun = { config, ... }: {
-    "x86_64-apple-darwin" = {
+    x86_64-apple-darwin = {
       double = "darwin-x86_64";
     };
-    "x86_64-unknown-linux-gnu" = {
+    x86_64-unknown-linux-gnu = {
       double = "linux-x86_64";
     };
-    "i686-unknown-linux-android" = {
+    i686-unknown-linux-android = {
       triple = "i686-linux-android";
       arch = "x86";
       toolchain = "x86";
       gccVer = "4.9";
     };
-    "x86_64-unknown-linux-android" = {
+    x86_64-unknown-linux-android = {
       triple = "x86_64-linux-android";
       arch = "x86_64";
       toolchain = "x86_64";
       gccVer = "4.9";
     };
-    "armv7a-unknown-linux-androideabi" = {
+    armv7a-unknown-linux-androideabi = {
       arch = "arm";
       triple = "arm-linux-androideabi";
       toolchain = "arm-linux-androideabi";
       gccVer = "4.9";
     };
-    "aarch64-unknown-linux-android" = {
+    aarch64-unknown-linux-android = {
       arch = "arm64";
       triple = "aarch64-linux-android";
       toolchain = "aarch64-linux-android";
diff --git a/pkgs/development/compilers/adoptopenjdk-bin/generate-sources.py b/pkgs/development/compilers/adoptopenjdk-bin/generate-sources.py
index 40b690048eb..22a3c9cf468 100755
--- a/pkgs/development/compilers/adoptopenjdk-bin/generate-sources.py
+++ b/pkgs/development/compilers/adoptopenjdk-bin/generate-sources.py
@@ -6,14 +6,15 @@ import re
 import requests
 import sys
 
-releases = ["openjdk11"]
-oses = ["mac", "linux"]
-types = ["jre", "jdk"]
-impls = ["hotspot", "openj9"]
+releases = ("openjdk8", "openjdk11")
+oses = ("mac", "linux")
+types = ("jre", "jdk")
+impls = ("hotspot", "openj9")
 
 arch_to_nixos = {
-    "x64": "x86_64",
-    "aarch64": "aarch64",
+    "x64": ("x86_64",),
+    "aarch64": ("aarch64",),
+    "arm": ("armv6l", "armv7l"),
 }
 
 def get_sha256(url):
@@ -23,7 +24,6 @@ def get_sha256(url):
         sys.exit(1)
     return resp.text.strip().split(" ")[0]
 
-RE_RELEASE_NAME = re.compile(r'[^-]+-([0-9.]+)\+([0-9]+)') # example release name: jdk-11.0.1+13
 def generate_sources(release, assets):
     out = {}
     for asset in assets:
@@ -33,7 +33,8 @@ def generate_sources(release, assets):
         if asset["heap_size"] != "normal": continue
         if asset["architecture"] not in arch_to_nixos: continue
 
-        version, build = RE_RELEASE_NAME.match(asset["release_name"]).groups()
+        # examples: 11.0.1+13, 8.0.222+10
+        version, build = asset["version_data"]["semver"].split("+")
 
         type_map = out.setdefault(asset["os"], {})
         impl_map = type_map.setdefault(asset["binary_type"], {})
@@ -42,12 +43,13 @@ def generate_sources(release, assets):
             "vmType": asset["openjdk_impl"],
         })
 
-        arch_map[arch_to_nixos[asset["architecture"]]] = {
-            "url": asset["binary_link"],
-            "sha256": get_sha256(asset["checksum_link"]),
-            "version": version,
-            "build": build,
-        }
+        for nixos_arch in arch_to_nixos[asset["architecture"]]:
+            arch_map[nixos_arch] = {
+                "url": asset["binary_link"],
+                "sha256": get_sha256(asset["checksum_link"]),
+                "version": version,
+                "build": build,
+            }
 
     return out
 
diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix
index 7b16d6ad9db..0e88e9c9798 100644
--- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix
+++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix
@@ -46,9 +46,6 @@ let cpuName = stdenv.hostPlatform.parsed.cpu.name;
 
   passthru.home = result;
 
-  # for backward compatibility
-  passthru.architecture = "";
-
   meta = with stdenv.lib; {
     license = licenses.gpl2Classpath;
     description = "AdoptOpenJDK, prebuilt OpenJDK binary";
diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix
index a837c6f1e85..509050209fb 100644
--- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix
+++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix
@@ -1,48 +1,17 @@
 sourcePerArch:
 
-{ swingSupport ? true
-, stdenv
+{ stdenv
+, lib
 , fetchurl
-, file
-, xorg ? null
-, glib
-, libxml2
-, ffmpeg_2
-, libxslt
-, libGL
+, autoPatchelfHook
+, alsaLib
 , freetype
 , fontconfig
-, gtk2
-, pango
-, cairo
-, alsaLib
-, atk
-, gdk-pixbuf
 , zlib
-, elfutils
+, xorg
 }:
 
-assert swingSupport -> xorg != null;
-
 let
-  rSubPaths = [
-    "lib/jli"
-    "lib/server"
-    "lib/compressedrefs" # OpenJ9
-    "lib/j9vm" # OpenJ9
-    "lib"
-  ];
-
-  libraries = [
-    stdenv.cc.libc glib libxml2 ffmpeg_2 libxslt libGL
-    xorg.libXxf86vm alsaLib fontconfig freetype pango gtk2 cairo gdk-pixbuf
-    atk zlib elfutils
-  ] ++ (stdenv.lib.optionals swingSupport [
-    xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp xorg.libXt
-    xorg.libXrender
-    stdenv.cc.cc
-  ]);
-
   cpuName = stdenv.hostPlatform.parsed.cpu.name;
 in
 
@@ -57,7 +26,12 @@ let result = stdenv.mkDerivation rec {
     inherit (sourcePerArch.${cpuName}) url sha256;
   };
 
-  nativeBuildInputs = [ file ];
+  buildInputs = [
+    alsaLib freetype fontconfig zlib xorg.libX11 xorg.libXext xorg.libXtst
+    xorg.libXi xorg.libXrender
+  ];
+
+  nativeBuildInputs = [ autoPatchelfHook ];
 
   # See: https://github.com/NixOS/patchelf/issues/10
   dontStrip = 1;
@@ -74,45 +48,31 @@ let result = stdenv.mkDerivation rec {
 
     # Remove embedded freetype to avoid problems like
     # https://github.com/NixOS/nixpkgs/issues/57733
-    rm $out/lib/libfreetype.so
-
-    # for backward compatibility
-    ln -s $out $out/jre
+    find "$out" -name 'libfreetype.so*' -delete
 
     mkdir -p $out/nix-support
 
     # Set JAVA_HOME automatically.
-    cat <<EOF >> $out/nix-support/setup-hook
+    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" {} \;
+  preFixup = ''
+    find "$out" -name libfontmanager.so -exec \
+      patchelf --add-needed libfontconfig.so {} \;
   '';
 
-  rpath = stdenv.lib.strings.makeLibraryPath libraries;
-
   # FIXME: use multiple outputs or return actual JRE package
   passthru.jre = result;
 
   passthru.home = result;
 
-  # for backward compatibility
-  passthru.architecture = "";
-
   meta = with stdenv.lib; {
     license = licenses.gpl2Classpath;
     description = "AdoptOpenJDK, prebuilt OpenJDK binary";
-    platforms = stdenv.lib.mapAttrsToList (arch: _: arch + "-linux") sourcePerArch; # some inherit jre.meta.platforms
-    maintainers = with stdenv.lib.maintainers; [ taku0 ];
+    platforms = lib.mapAttrsToList (arch: _: arch + "-linux") sourcePerArch; # some inherit jre.meta.platforms
+    maintainers = with lib.maintainers; [ taku0 ];
   };
 
 }; in result
diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk8-darwin.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk8-darwin.nix
new file mode 100644
index 00000000000..a170e0141cf
--- /dev/null
+++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk8-darwin.nix
@@ -0,0 +1,9 @@
+let
+  sources = builtins.fromJSON (builtins.readFile ./sources.json);
+in
+{
+  jdk-hotspot = import ./jdk-darwin-base.nix sources.openjdk8.mac.jdk.hotspot;
+  jre-hotspot = import ./jdk-darwin-base.nix sources.openjdk8.mac.jre.hotspot;
+  jdk-openj9 = import ./jdk-darwin-base.nix sources.openjdk8.mac.jdk.openj9;
+  jre-openj9 = import ./jdk-darwin-base.nix sources.openjdk8.mac.jre.openj9;
+}
diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk8-linux.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk8-linux.nix
new file mode 100644
index 00000000000..4937eace490
--- /dev/null
+++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk8-linux.nix
@@ -0,0 +1,9 @@
+let
+  sources = builtins.fromJSON (builtins.readFile ./sources.json);
+in
+{
+  jdk-hotspot = import ./jdk-linux-base.nix sources.openjdk8.linux.jdk.hotspot;
+  jre-hotspot = import ./jdk-linux-base.nix sources.openjdk8.linux.jre.hotspot;
+  jdk-openj9 = import ./jdk-linux-base.nix sources.openjdk8.linux.jdk.openj9;
+  jre-openj9 = import ./jdk-linux-base.nix sources.openjdk8.linux.jre.openj9;
+}
diff --git a/pkgs/development/compilers/adoptopenjdk-bin/sources.json b/pkgs/development/compilers/adoptopenjdk-bin/sources.json
index 03febb6aa35..403bd96efb0 100644
--- a/pkgs/development/compilers/adoptopenjdk-bin/sources.json
+++ b/pkgs/development/compilers/adoptopenjdk-bin/sources.json
@@ -4,56 +4,68 @@
       "jdk": {
         "hotspot": {
           "aarch64": {
+            "build": "11",
+            "sha256": "10e33e1862638e11a9158947b3d7b461727d8e396e378b171be1eb4dfe12f1ed",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.4_11.tar.gz",
+            "version": "11.0.4"
+          },
+          "armv6l": {
+            "build": "7",
+            "sha256": "3fbe418368e6d5888d0f15c4751139eb60d9785b864158a001386537fa46f67e",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_arm_linux_hotspot_11.0.3_7.tar.gz",
+            "version": "11.0.3"
+          },
+          "armv7l": {
             "build": "7",
-            "sha256": "894a846600ddb0df474350037a2fb43e3343dc3606809a20c65e750580d8f2b9",
-            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.3_7.tar.gz",
+            "sha256": "3fbe418368e6d5888d0f15c4751139eb60d9785b864158a001386537fa46f67e",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_arm_linux_hotspot_11.0.3_7.tar.gz",
             "version": "11.0.3"
           },
           "packageType": "jdk",
           "vmType": "hotspot",
           "x86_64": {
-            "build": "7",
-            "sha256": "23cded2b43261016f0f246c85c8948d4a9b7f2d44988f75dad69723a7a526094",
-            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz",
-            "version": "11.0.3"
+            "build": "11",
+            "sha256": "90c33cf3f2ed0bd773f648815de7347e69cfbb3416ef3bf41616ab1c4aa0f5a8",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz",
+            "version": "11.0.4"
           }
         },
         "openj9": {
           "packageType": "jdk",
           "vmType": "openj9",
           "x86_64": {
-            "build": "7",
-            "sha256": "7012edd56fc958070bc4747073de14ea08eb43081eb6ea19bdbf4763186e2d17",
-            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7_openj9-0.14.0/OpenJDK11U-jdk_x64_linux_openj9_11.0.3_7_openj9-0.14.0.tar.gz",
-            "version": "11.0.3"
+            "build": "11",
+            "sha256": "b1099cccc80a3f434728c9bc3b8a90395793b625f4680ca05267cf635143d64d",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11_openj9-0.15.1/OpenJDK11U-jdk_x64_linux_openj9_11.0.4_11_openj9-0.15.1.tar.gz",
+            "version": "11.0.4"
           }
         }
       },
       "jre": {
         "hotspot": {
           "aarch64": {
-            "build": "7",
-            "sha256": "de31fab70640c6d5099de5fc8fa8b4d6b484a7352fa48a9fafbdc088ca708564",
-            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.3_7.tar.gz",
-            "version": "11.0.3"
+            "build": "11",
+            "sha256": "5f7b5c110fc0f344a549cb11784a6d76838061a2b6f654f7841f60e0cd286c6a",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.4_11.tar.gz",
+            "version": "11.0.4"
           },
           "packageType": "jre",
           "vmType": "hotspot",
           "x86_64": {
-            "build": "7",
-            "sha256": "d2df8bc799b09c8375f79bf646747afac3d933bb1f65de71d6c78e7466ff8fe4",
-            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jre_x64_linux_hotspot_11.0.3_7.tar.gz",
-            "version": "11.0.3"
+            "build": "11",
+            "sha256": "70d2cc675155476f1d8516a7ae6729d44681e4fad5a6fc8dfa65cab36a67b7e0",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jre_x64_linux_hotspot_11.0.4_11.tar.gz",
+            "version": "11.0.4"
           }
         },
         "openj9": {
           "packageType": "jre",
           "vmType": "openj9",
           "x86_64": {
-            "build": "7",
-            "sha256": "14c660294832c7b2deb2845d96dce83df677e204b4f0f1fee0052764c4a56720",
-            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7_openj9-0.14.0/OpenJDK11U-jre_x64_linux_openj9_11.0.3_7_openj9-0.14.0.tar.gz",
-            "version": "11.0.3"
+            "build": "11",
+            "sha256": "c2601e7cb22af7a910e03883280cee805074656104d6d3dcaaf30e3bbb832690",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11_openj9-0.15.1/OpenJDK11U-jre_x64_linux_openj9_11.0.4_11_openj9-0.15.1.tar.gz",
+            "version": "11.0.4"
           }
         }
       }
@@ -64,20 +76,20 @@
           "packageType": "jdk",
           "vmType": "hotspot",
           "x86_64": {
-            "build": "7",
-            "sha256": "5ca2a24f1827bd7c110db99854693bf418f51ee3093c31332db5cd605278faad",
-            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_mac_hotspot_11.0.3_7.tar.gz",
-            "version": "11.0.3"
+            "build": "11",
+            "sha256": "a50b211f475b9497311c9b65594764d7b852b1653f249582bb20fc3c302846a5",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_x64_mac_hotspot_11.0.4_11.tar.gz",
+            "version": "11.0.4"
           }
         },
         "openj9": {
           "packageType": "jdk",
           "vmType": "openj9",
           "x86_64": {
-            "build": "7",
-            "sha256": "01045a99ff23bda354f82c0fd3fa6e8222e4a5acce7494e82495f47b30bc5e18",
-            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7_openj9-0.14.0/OpenJDK11U-jdk_x64_mac_openj9_11.0.3_7_openj9-0.14.0.tar.gz",
-            "version": "11.0.3"
+            "build": "11",
+            "sha256": "7c09678d9c2d9dd0366693c6ab27bed39c76a23e7ac69b8a25c794e99dcf3ba7",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11_openj9-0.15.1/OpenJDK11U-jdk_x64_mac_openj9_11.0.4_11_openj9-0.15.1.tar.gz",
+            "version": "11.0.4"
           }
         }
       },
@@ -86,20 +98,126 @@
           "packageType": "jre",
           "vmType": "hotspot",
           "x86_64": {
-            "build": "7",
-            "sha256": "9523b97288ff5d50e404565d346ed8ea8f19dd155092951af88d4be6b8414776",
-            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jre_x64_mac_hotspot_11.0.3_7.tar.gz",
-            "version": "11.0.3"
+            "build": "11",
+            "sha256": "1647fded28d25e562811f7bce2092eb9c21d30608843b04250c023b40604ff26",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jre_x64_mac_hotspot_11.0.4_11.tar.gz",
+            "version": "11.0.4"
           }
         },
         "openj9": {
           "packageType": "jre",
           "vmType": "openj9",
           "x86_64": {
-            "build": "7",
-            "sha256": "150c4065a57ec368b692276e8e3320b183ee17b402b7db07e676dff5837f0c52",
-            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7_openj9-0.14.0/OpenJDK11U-jre_x64_mac_openj9_11.0.3_7_openj9-0.14.0.tar.gz",
-            "version": "11.0.3"
+            "build": "11",
+            "sha256": "1a8e84bae517a848aa5f25c7b04f26ab3a3bfffaa7fdf9be24e1f83325e46766",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11_openj9-0.15.1/OpenJDK11U-jre_x64_mac_openj9_11.0.4_11_openj9-0.15.1.tar.gz",
+            "version": "11.0.4"
+          }
+        }
+      }
+    }
+  },
+  "openjdk8": {
+    "linux": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "10",
+            "sha256": "652776586ede124189dc218174b5922cc97feac81021ad81905900b349a352d2",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_aarch64_linux_hotspot_8u222b10.tar.gz",
+            "version": "8.0.222"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "10",
+            "sha256": "37356281345b93feb4212e6267109b4409b55b06f107619dde4960e402bafa77",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz",
+            "version": "8.0.222"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "10",
+            "sha256": "20cff719c6de43f8bb58c7f59e251da7c1fa2207897c9a4768c8c669716dc819",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jdk_x64_linux_openj9_8u222b10_openj9-0.15.1.tar.gz",
+            "version": "8.0.222"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "10",
+            "sha256": "dfaf5a121f7606c54bd6232793677a4267eddf65d29cde352b84d84edbccbb51",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_aarch64_linux_hotspot_8u222b10.tar.gz",
+            "version": "8.0.222"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "10",
+            "sha256": "a418ce895c8bf3ca2e7b2f423f038b8b093941684c9430f2e40da0982e12b52d",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_x64_linux_hotspot_8u222b10.tar.gz",
+            "version": "8.0.222"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "10",
+            "sha256": "ae56994a7c8e8c19939c0c2ff8fe5a850eb2f23845c499aa5ede26deb3d5ad28",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jre_x64_linux_openj9_8u222b10_openj9-0.15.1.tar.gz",
+            "version": "8.0.222"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "10",
+            "sha256": "9605fd00d2960934422437f601c7a9a1c5537309b9199d5bc75f84f20cd29a76",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_mac_hotspot_8u222b10.tar.gz",
+            "version": "8.0.222"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "10",
+            "sha256": "df185e167756332163633a826b329db067f8a721f7d5d27f0b353a35fc415de0",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jdk_x64_mac_openj9_8u222b10_openj9-0.15.1.tar.gz",
+            "version": "8.0.222"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "10",
+            "sha256": "b3ac2436534cea932ccf665b317dbf5ffc0ee065efca808b22b6c2d795ca1b90",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_x64_mac_hotspot_8u222b10.tar.gz",
+            "version": "8.0.222"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "10",
+            "sha256": "d5754413d7bc3a3233aaa7f8465451fbdabaf2a0c2a91743155bf135a3047ec8",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jre_x64_mac_openj9_8u222b10_openj9-0.15.1.tar.gz",
+            "version": "8.0.222"
           }
         }
       }
diff --git a/pkgs/development/compilers/binaryen/default.nix b/pkgs/development/compilers/binaryen/default.nix
index c0e6c4b5004..664335c3dad 100644
--- a/pkgs/development/compilers/binaryen/default.nix
+++ b/pkgs/development/compilers/binaryen/default.nix
@@ -5,7 +5,7 @@ let
 
   # Map from git revs to SHA256 hashes
   sha256s = {
-    "version_89" = "0rh1dq33ilq54szfgi1ajaiaj7rbylai02rhp9zm9vpwp0rw8mij";
+    version_89 = "0rh1dq33ilq54szfgi1ajaiaj7rbylai02rhp9zm9vpwp0rw8mij";
     "1.38.28" = "172s7y5f38736ic8ri3mnbdqcrkadd40a26cxcfwbscc53phl11v";
   };
 in
diff --git a/pkgs/development/compilers/ccl/default.nix b/pkgs/development/compilers/ccl/default.nix
index 6fac183125f..ec166352267 100644
--- a/pkgs/development/compilers/ccl/default.nix
+++ b/pkgs/development/compilers/ccl/default.nix
@@ -29,7 +29,7 @@ let
     };
     armv6l-linux = armv7l-linux;
   };
-  cfg = options."${stdenv.hostPlatform.system}" or (throw "missing source url for platform ${stdenv.hostPlatform.system}");
+  cfg = options.${stdenv.hostPlatform.system} or (throw "missing source url for platform ${stdenv.hostPlatform.system}");
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix
index ff167297305..d9392721fa5 100644
--- a/pkgs/development/compilers/crystal/default.nix
+++ b/pkgs/development/compilers/crystal/default.nix
@@ -12,12 +12,12 @@
 
 let
   archs = {
-    "x86_64-linux"  = "linux-x86_64";
-    "i686-linux"    = "linux-i686";
-    "x86_64-darwin" = "darwin-x86_64";
+    x86_64-linux  = "linux-x86_64";
+    i686-linux    = "linux-i686";
+    x86_64-darwin = "darwin-x86_64";
   };
 
-  arch = archs."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
+  arch = archs.${stdenv.system} or (throw "system ${stdenv.system} not supported");
 
   checkInputs = [ git gmp openssl readline libxml2 libyaml ];
 
@@ -28,7 +28,7 @@ let
 
     src = fetchurl {
       url = "https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-${toString rel}-${arch}.tar.gz";
-      sha256 = sha256s."${stdenv.system}";
+      sha256 = sha256s.${stdenv.system};
     };
 
     buildCommand = ''
@@ -148,27 +148,27 @@ in rec {
   binaryCrystal_0_26 = genericBinary {
     version = "0.26.1";
     sha256s = {
-      "x86_64-linux"  = "1xban102yiiwmlklxvn3xp3q546bp8hlxxpakayajkhhnpl6yv45";
-      "i686-linux"    = "1igspf1lrv7wpmz0pfrkbx8m1ykvnv4zhic53cav4nicppm2v0ic";
-      "x86_64-darwin" = "1mri8bfrcldl69gczxpihxpv1shn4bijx28m3qby8vnk0ii63n9s";
+      x86_64-linux  = "1xban102yiiwmlklxvn3xp3q546bp8hlxxpakayajkhhnpl6yv45";
+      i686-linux    = "1igspf1lrv7wpmz0pfrkbx8m1ykvnv4zhic53cav4nicppm2v0ic";
+      x86_64-darwin = "1mri8bfrcldl69gczxpihxpv1shn4bijx28m3qby8vnk0ii63n9s";
     };
   };
 
   binaryCrystal_0_27 = genericBinary {
     version = "0.27.2";
     sha256s = {
-      "x86_64-linux"  = "05l5x7kx2acgnv42fj3rr17z73ix06zvi05h7d7vf3kw0izxrasm";
-      "i686-linux"    = "1iwizkvn6pglc0azkyfhlmk9ap793krdgcnbihd1kvrvs4cz0mm9";
-      "x86_64-darwin" = "14c69ac2dmfwmb5q56ps3xyxxb0mrbc91ahk9h07c8fiqfii3k9g";
+      x86_64-linux  = "05l5x7kx2acgnv42fj3rr17z73ix06zvi05h7d7vf3kw0izxrasm";
+      i686-linux    = "1iwizkvn6pglc0azkyfhlmk9ap793krdgcnbihd1kvrvs4cz0mm9";
+      x86_64-darwin = "14c69ac2dmfwmb5q56ps3xyxxb0mrbc91ahk9h07c8fiqfii3k9g";
     };
   };
 
   binaryCrystal_0_29 = genericBinary {
     version = "0.29.0";
     sha256s = {
-      "x86_64-linux"  = "1wrk29sfx35akg7hxwpdiikvl18wd40gq1kwirw7x522hnq7vlna";
-      "i686-linux"    = "1nx0piis2k3nn7kqiijqazzbvlaavhgvsln0l3dxmpfa4i4dz5h2";
-      "x86_64-darwin" = "1fd0fbyf05abivnp3igjlrm2axf65n2wdmg4aq6nqj60ipc01rvd";
+      x86_64-linux  = "1wrk29sfx35akg7hxwpdiikvl18wd40gq1kwirw7x522hnq7vlna";
+      i686-linux    = "1nx0piis2k3nn7kqiijqazzbvlaavhgvsln0l3dxmpfa4i4dz5h2";
+      x86_64-darwin = "1fd0fbyf05abivnp3igjlrm2axf65n2wdmg4aq6nqj60ipc01rvd";
     };
   };
 
diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix
index 332ded31df6..6cae1fa073b 100644
--- a/pkgs/development/compilers/dmd/default.nix
+++ b/pkgs/development/compilers/dmd/default.nix
@@ -13,7 +13,7 @@ let
   dmdConfFile = writeTextFile {
       name = "dmd.conf";
       text = (lib.generators.toINI {} {
-        "Environment" = {
+        Environment = {
           DFLAGS = ''-I@out@/include/dmd -L-L@out@/lib -fPIC ${stdenv.lib.optionalString (!targetPackages.stdenv.cc.isClang) "-L--export-dynamic"}'';
         };
       });
diff --git a/pkgs/development/compilers/elm/packages/node-composition.nix b/pkgs/development/compilers/elm/packages/node-composition.nix
index fa0a1482f97..7f20c74dbd4 100644
--- a/pkgs/development/compilers/elm/packages/node-composition.nix
+++ b/pkgs/development/compilers/elm/packages/node-composition.nix
@@ -2,7 +2,7 @@
 
 {pkgs ? import <nixpkgs> {
     inherit system;
-  }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-10_x"}:
+  }, system ? builtins.currentSystem, nodejs ? pkgs.nodejs-10_x}:
 
 let
   nodeEnv = import ./node-env.nix {
diff --git a/pkgs/development/compilers/ghc/8.2.2-binary.nix b/pkgs/development/compilers/ghc/8.2.2-binary.nix
index 9fe3a7d9dba..d68bf7e24b5 100644
--- a/pkgs/development/compilers/ghc/8.2.2-binary.nix
+++ b/pkgs/development/compilers/ghc/8.2.2-binary.nix
@@ -29,23 +29,23 @@ stdenv.mkDerivation rec {
   name = "ghc-${version}-binary";
 
   src = fetchurl ({
-    "i686-linux" = {
+    i686-linux = {
       url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-deb8-linux.tar.xz";
       sha256 = "08w2ik55dp3n95qikmrflc91lsiq01xp53ki3jlhnbj8fqnxfrwy";
     };
-    "x86_64-linux" = {
+    x86_64-linux = {
       url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-deb8-linux.tar.xz";
       sha256 = "0ahv26304pqi3dm7i78si4pxwvg5f5dc2jwsfgvcrhcx5g30bqj8";
     };
-    "armv7l-linux" = {
+    armv7l-linux = {
       url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-armv7-deb8-linux.tar.xz";
       sha256 = "1jmv8qmnh5bn324fivbwdcaj55kvw7cb2zq9pafmlmv3qwwx7s46";
     };
-    "aarch64-linux" = {
+    aarch64-linux = {
       url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-aarch64-deb8-linux.tar.xz";
       sha256 = "1k2amylcp1ad67c75h1pqf7czf9m0zj1i7hdc45ghjklnfq9hrk7";
     };
-    "x86_64-darwin" = {
+    x86_64-darwin = {
       url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
       sha256 = "09swx71gh5habzbx55shz2xykgr96xkcy09nzinnm4z0yxicy3zr";
     };
diff --git a/pkgs/development/compilers/ghc/8.6.3-binary.nix b/pkgs/development/compilers/ghc/8.6.3-binary.nix
index 7e845da5b64..152bd5e4874 100644
--- a/pkgs/development/compilers/ghc/8.6.3-binary.nix
+++ b/pkgs/development/compilers/ghc/8.6.3-binary.nix
@@ -29,15 +29,15 @@ stdenv.mkDerivation rec {
   name = "ghc-${version}-binary";
 
   src = fetchurl ({
-    "i686-linux" = {
+    i686-linux = {
       url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-deb8-linux.tar.xz";
       sha256 = "0bw8a7fxcbskf93rb4m542ff66vrmx5i5kj77qx37cbhijx70w5m";
     };
-    "x86_64-linux" = {
+    x86_64-linux = {
       url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-deb8-linux.tar.xz";
       sha256 = "1m9gaga2pzi2cx5gvasg0rx1dlvr68gmi20l67652kag6xjsa719";
     };
-    "x86_64-darwin" = {
+    x86_64-darwin = {
       url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
       sha256 = "1hbzk57v45176kxcx848p5jn5p1xbp2129ramkbzsk6plyhnkl3r";
     };
diff --git a/pkgs/development/compilers/go/1.11.nix b/pkgs/development/compilers/go/1.11.nix
index a8787639053..32847a2671c 100644
--- a/pkgs/development/compilers/go/1.11.nix
+++ b/pkgs/development/compilers/go/1.11.nix
@@ -17,13 +17,13 @@ let
   '';
 
   goarch = platform: {
-    "i686" = "386";
-    "x86_64" = "amd64";
-    "aarch64" = "arm64";
-    "arm" = "arm";
-    "armv5tel" = "arm";
-    "armv6l" = "arm";
-    "armv7l" = "arm";
+    i686 = "386";
+    x86_64 = "amd64";
+    aarch64 = "arm64";
+    arm = "arm";
+    armv5tel = "arm";
+    armv6l = "arm";
+    armv7l = "arm";
   }.${platform.parsed.cpu.name} or (throw "Unsupported system");
 
 in
diff --git a/pkgs/development/compilers/go/1.12.nix b/pkgs/development/compilers/go/1.12.nix
index dae4c173223..817f3ab324d 100644
--- a/pkgs/development/compilers/go/1.12.nix
+++ b/pkgs/development/compilers/go/1.12.nix
@@ -17,13 +17,13 @@ let
   '';
 
   goarch = platform: {
-    "i686" = "386";
-    "x86_64" = "amd64";
-    "aarch64" = "arm64";
-    "arm" = "arm";
-    "armv5tel" = "arm";
-    "armv6l" = "arm";
-    "armv7l" = "arm";
+    i686 = "386";
+    x86_64 = "amd64";
+    aarch64 = "arm64";
+    arm = "arm";
+    armv5tel = "arm";
+    armv6l = "arm";
+    armv7l = "arm";
   }.${platform.parsed.cpu.name} or (throw "Unsupported system");
 
 in
diff --git a/pkgs/development/compilers/go/1.4.nix b/pkgs/development/compilers/go/1.4.nix
index 97c243439e8..1052f1f1ae1 100644
--- a/pkgs/development/compilers/go/1.4.nix
+++ b/pkgs/development/compilers/go/1.4.nix
@@ -4,7 +4,7 @@
 , Security }:
 
 let
-  libc = if stdenv ? "cross" then libcCross else stdenv.cc.libc;
+  libc = if stdenv ? cross then libcCross else stdenv.cc.libc;
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/compilers/julia/shared.nix b/pkgs/development/compilers/julia/shared.nix
index c0414c6259f..c706f2facec 100644
--- a/pkgs/development/compilers/julia/shared.nix
+++ b/pkgs/development/compilers/julia/shared.nix
@@ -129,10 +129,10 @@ stdenv.mkDerivation rec {
   makeFlags =
     let
       arch = head (splitString "-" stdenv.system);
-      march = { "x86_64" = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; "i686" = "pentium4"; }."${arch}"
+      march = { x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; i686 = "pentium4"; }.${arch}
               or (throw "unsupported architecture: ${arch}");
       # Julia requires Pentium 4 (SSE2) or better
-      cpuTarget = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}"
+      cpuTarget = { x86_64 = "x86-64"; i686 = "pentium4"; }.${arch}
                   or (throw "unsupported architecture: ${arch}");
     in [
       "ARCH=${arch}"
diff --git a/pkgs/development/compilers/mozart/binary.nix b/pkgs/development/compilers/mozart/binary.nix
index 2067184a5b0..8eb35f1b5f7 100644
--- a/pkgs/development/compilers/mozart/binary.nix
+++ b/pkgs/development/compilers/mozart/binary.nix
@@ -8,7 +8,7 @@ let
   version = "2.0.0";
 
   binaries = {
-    "x86_64-linux" = fetchurl {
+    x86_64-linux = fetchurl {
       url = "mirror://sourceforge/project/mozart-oz/v${version}-alpha.0/mozart2-${version}-alpha.0+build.4105.5c06ced-x86_64-linux.tar.gz";
       sha256 = "0rsfrjimjxqbwprpzzlmydl3z3aiwg5qkb052jixdxjyad7gyh5z";
     };
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
 
   preferLocalBuild = true;
 
-  src = binaries."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}");
+  src = binaries.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}");
 
   libPath = stdenv.lib.makeLibraryPath
     [ stdenv.cc.cc
diff --git a/pkgs/development/compilers/openjdk/005_enable-infinality.patch b/pkgs/development/compilers/openjdk/005_enable-infinality.patch
index f8de9698996..cc34e548758 100644
--- a/pkgs/development/compilers/openjdk/005_enable-infinality.patch
+++ b/pkgs/development/compilers/openjdk/005_enable-infinality.patch
@@ -6,7 +6,7 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
 @@ -23,6 +23,9 @@
   * questions.
   */
- 
+
 +/* Use Infinality patches as default */
 +#define INFINALITY
 +
@@ -21,13 +21,13 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
 +#include FT_LCD_FILTER_H
 +#include <fontconfig/fontconfig.h>
 +#endif
- 
+
  #include "fontscaler.h"
- 
+
 @@ -676,6 +683,147 @@ static void CopyFTSubpixelVToSubpixel(co
      }
  }
- 
+
 +#ifdef INFINALITY
 +typedef struct {
 +    FT_Render_Mode ftRenderMode;
@@ -169,7 +169,7 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
 +    rp->ftLcdFilter = ftLcdFilter;
 +}
 +#endif
- 
+
  /*
   * Class:     sun_font_FreetypeFontScaler
 @@ -691,7 +839,9 @@ Java_sun_font_FreetypeFontScaler_getGlyp
@@ -180,28 +180,27 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
      int renderFlags = FT_LOAD_RENDER, target;
 +#endif
      FT_GlyphSlot ftglyph;
- 
+
      FTScalerContext* context =
-@@ -709,6 +859,11 @@ Java_sun_font_FreetypeFontScaler_getGlyp
+@@ -709,5 +859,10 @@ Java_sun_font_FreetypeFontScaler_getGlyp
          return ptr_to_jlong(getNullGlyphImage());
      }
- 
+
 +#ifdef INFINALITY
 +    RenderingProperties renderingProperties;
 +    readFontconfig((const FcChar8 *) scalerInfo->face->family_name,
 +                   context->ptsz, context->aaType, &renderingProperties);
 +#else
-     /* if algorithmic styling is required then we do not request bitmap */
-     if (context->doBold || context->doItalize) {
-         renderFlags =  FT_LOAD_DEFAULT;
+     if (!context->useSbits) {
+          renderFlags |= FT_LOAD_NO_BITMAP;
 @@ -731,10 +886,17 @@ Java_sun_font_FreetypeFontScaler_getGlyp
          target = FT_LOAD_TARGET_LCD_V;
      }
      renderFlags |= target;
 +#endif
- 
+
      glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
- 
+
 +#ifdef INFINALITY
 +    FT_Library_SetLcdFilter(scalerInfo->library, renderingProperties.ftLcdFilter);
 +    error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderingProperties.ftLoadFlags);
@@ -213,7 +212,7 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
          //do not destroy scaler yet.
          //this can be problem of particular context (e.g. with bad transform)
 @@ -753,9 +915,13 @@ Java_sun_font_FreetypeFontScaler_getGlyp
- 
+
      /* generate bitmap if it is not done yet
       e.g. if algorithmic styling is performed and style was added to outline */
 +#ifdef INFINALITY
@@ -223,7 +222,7 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
          FT_Render_Glyph(ftglyph, FT_LOAD_TARGET_MODE(target));
      }
 +#endif
- 
+
      width  = (UInt16) ftglyph->bitmap.width;
      height = (UInt16) ftglyph->bitmap.rows;
 @@ -969,7 +1135,9 @@ Java_sun_font_FreetypeFontScaler_getGlyp
@@ -239,7 +238,7 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
 @@ -984,11 +1152,22 @@ static FT_Outline* getFTOutline(JNIEnv*
          return NULL;
      }
- 
+
 +#ifdef INFINALITY
 +    RenderingProperties renderingProperties;
 +    readFontconfig((const FcChar8 *) scalerInfo->face->family_name,
@@ -247,9 +246,9 @@ diff -ur a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native
 +#else
      renderFlags = FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
 +#endif
- 
+
      glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
- 
+
 +#ifdef INFINALITY
 +    error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderingProperties.ftLoadFlags);
 +#else
diff --git a/pkgs/development/compilers/openjdk/11.nix b/pkgs/development/compilers/openjdk/11.nix
index 7ccbfb6351d..57911f2d58e 100644
--- a/pkgs/development/compilers/openjdk/11.nix
+++ b/pkgs/development/compilers/openjdk/11.nix
@@ -1,42 +1,33 @@
-{ stdenv, lib, fetchurl, bash, cpio, autoconf, pkgconfig, file, which, unzip, zip, cups, freetype
-, alsaLib, bootjdk, perl, fontconfig, zlib, lndir
-, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama, libXcursor, libXrandr
-, libjpeg, giflib
+{ stdenv, lib, fetchurl, bash, pkgconfig, autoconf, cpio, file, which, unzip
+, zip, perl, cups, freetype, alsaLib, libjpeg, giflib, libpng, zlib, lcms2
+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
+, libXcursor, libXrandr, fontconfig, openjdk11-bootstrap
 , setJavaClassPath
-, minimal ? false
-, enableJavaFX ? true, openjfx
+, headless ? false
+, enableJavaFX ? openjfx.meta.available, openjfx
 , enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
 }:
 
 let
-
-  /**
-   * The JDK libraries are in directories that depend on the CPU.
-   */
-  architecture =
-    if stdenv.hostPlatform.system == "i686-linux" then
-      "i386"
-    else "amd64";
-
   major = "11";
-  update = ".0.3";
+  update = ".0.4";
   build = "ga";
-  repover = "jdk-${major}${update}-${build}";
 
-  openjdk = stdenv.mkDerivation {
-    name = "openjdk-${major}${update}-${build}";
+  openjdk = stdenv.mkDerivation rec {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${major}${update}-${build}";
 
     src = fetchurl {
-      url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/${repover}.tar.gz";
+      url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/jdk-${version}.tar.gz";
       sha256 = "1v6pam38iidlhz46046h17hf5kki6n3kl302awjcyxzk7bmkvb8x";
     };
 
-    nativeBuildInputs = [ pkgconfig ];
+    nativeBuildInputs = [ pkgconfig autoconf ];
     buildInputs = [
-      autoconf cpio file which unzip zip perl bootjdk zlib cups freetype alsaLib
-      libjpeg giflib libX11 libICE libXext libXrender libXtst libXt libXtst
-      libXi libXinerama libXcursor libXrandr lndir fontconfig
-    ] ++ lib.optionals (!minimal && enableGnome2) [
+      cpio file which unzip zip perl zlib cups freetype alsaLib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk11-bootstrap
+    ] ++ lib.optionals (!headless && enableGnome2) [
       gtk3 gnome_vfs GConf glib
     ];
 
@@ -45,66 +36,60 @@ let
       ./read-truststore-from-env-jdk10.patch
       ./currency-date-range-jdk10.patch
       ./increase-javadoc-heap.patch
-    ] ++ lib.optionals (!minimal && enableGnome2) [
+    ] ++ lib.optionals (!headless && enableGnome2) [
       ./swing-use-gtk-jdk10.patch
     ];
 
     preConfigure = ''
       chmod +x configure
       substituteInPlace configure --replace /bin/bash "${bash}/bin/bash"
-
-      configureFlagsArray=(
-        "--with-boot-jdk=${bootjdk.home}"
-        "--with-update-version=${major}${update}"
-        "--with-build-number=${build}"
-        "--with-milestone=fcs"
-        "--enable-unlimited-crypto"
-        "--disable-debug-symbols"
-        "--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 (architecture == "amd64") " \"--with-jvm-features=zgc\""
-    + lib.optionalString minimal " \"--enable-headless-only\""
-    + lib.optionalString (!minimal && enableJavaFX) " \"--with-import-modules=${openjfx}\""
-    + ");"
-    # 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) [
+    configureFlags = [
+      "--with-boot-jdk=${openjdk11-bootstrap.home}"
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-libjpeg=system"
+      "--with-giflib=system"
+      "--with-libpng=system"
+      "--with-zlib=system"
+      "--with-lcms=system"
+      "--with-stdc++lib=dynamic"
+    ] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
+      ++ lib.optional headless "--enable-headless-only"
+      ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
+
+    separateDebugInfo = true;
+
+    NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
+
+    NIX_LDFLAGS = lib.optionals (!headless) [
       "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
-    ] ++ lib.optionals (!minimal && enableGnome2) [
+    ] ++ lib.optionals (!headless && enableGnome2) [
       "-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
     ];
 
     buildFlags = [ "all" ];
 
     installPhase = ''
-      mkdir -p $out/lib/openjdk $out/share
+      mkdir -p $out/lib
 
-      cp -av build/*/images/jdk/* $out/lib/openjdk
+      mv 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/
+      mkdir -p $out/share
+      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/
 
       # Remove crap from the installation.
       rm -rf $out/lib/openjdk/demo
-      ${lib.optionalString minimal ''
+      ${lib.optionalString headless ''
         rm $out/lib/openjdk/lib/{libjsound,libfontmanager}.so
       ''}
 
@@ -129,11 +114,12 @@ let
       # Build the set of output library directories to rpath against
       LIBDIRS=""
       for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
         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
+        if [ "$output" = debug ]; then continue; fi
         OUTPUTDIR=$(eval echo \$$output)
         BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
         echo "$BINLIBS" | while read i; do
@@ -141,26 +127,20 @@ let
           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
     '';
 
+    disallowedReferences = [ openjdk11-bootstrap ];
+
     meta = with stdenv.lib; {
       homepage = http://openjdk.java.net/;
       license = licenses.gpl2;
       description = "The open-source Java Development Kit";
       maintainers = with maintainers; [ edwtjo ];
-      platforms = ["i686-linux" "x86_64-linux"];
+      platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
     };
 
     passthru = {
-      inherit architecture;
+      architecture = "";
       home = "${openjdk}/lib/openjdk";
     };
   };
diff --git a/pkgs/development/compilers/openjdk/8.nix b/pkgs/development/compilers/openjdk/8.nix
index 952c5d1bf6a..e764e9c62cb 100644
--- a/pkgs/development/compilers/openjdk/8.nix
+++ b/pkgs/development/compilers/openjdk/8.nix
@@ -1,9 +1,10 @@
 { stdenv, lib, fetchurl, bash, cpio, pkgconfig, file, which, unzip, zip, cups, freetype
-, alsaLib, bootjdk, cacert, perl, liberation_ttf, fontconfig, zlib, lndir
+, alsaLib, cacert, perl, liberation_ttf, fontconfig, zlib
 , libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama, libXcursor, libXrandr
 , libjpeg, giflib
+, openjdk8-bootstrap
 , setJavaClassPath
-, minimal ? false
+, headless ? false
 , enableInfinality ? true # font rendering patch
 , enableGnome2 ? true, gtk2, gnome_vfs, glib, GConf
 }:
@@ -13,52 +14,71 @@ let
   /**
    * The JRE libraries are in directories that depend on the CPU.
    */
-  architecture =
-    if stdenv.hostPlatform.system == "i686-linux" then
-      "i386"
-    else if stdenv.hostPlatform.system == "x86_64-linux" then
-      "amd64"
-    else
-      throw "openjdk requires i686-linux or x86_64 linux";
-
-  update = "212";
-  build = "ga";
-  baseurl = "http://hg.openjdk.java.net/jdk8u/jdk8u";
-  repover = "jdk8u${update}-${build}";
+  architecture = {
+    i686-linux = "i386";
+    x86_64-linux = "amd64";
+    aarch64-linux = "aarch64";
+  }.${stdenv.system} or (throw "Unsupported platform");
+
+  update = "222";
+  build = if stdenv.isAarch64 then "b10"
+          else "ga";
+  baseurl = if stdenv.isAarch64 then "https://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah"
+            else "https://hg.openjdk.java.net/jdk8u/jdk8u";
+  repover = lib.optionalString stdenv.isAarch64 "aarch64-shenandoah-"
+            + "jdk8u${update}-${build}";
+
   jdk8 = fetchurl {
+             name = "jdk8-${repover}.tar.gz";
              url = "${baseurl}/archive/${repover}.tar.gz";
-             sha256 = "00rl33h4cl4b4p3hcid765h38x2jdkb14ylh8k1zhnd0ka76crgg";
+             sha256 = if stdenv.isAarch64 then "1h19zpmc76f8v4s0mfvqxmxvv8imdwq92z5dmgi19y4xnl978qq8"
+                      else "19dyqayn8n2y08p08g34xxnf0dkm6bfjxkp7633m7dx50mjcpxnj";
           };
   langtools = fetchurl {
+             name = "langtools-${repover}.tar.gz";
              url = "${baseurl}/langtools/archive/${repover}.tar.gz";
-             sha256 = "0va6g2dccf1ph6mpwxswbks5axp7zz258cl89qq9r8jn4ni04agw";
+             sha256 = if stdenv.isAarch64 then "09phy2izw2yyp3hnw7jmb7lp559dgnp2a0rymx1k3q97anfz3bzj"
+                      else "11nibmqnf7nap10sydk57gimgwpxqk5mn12dyg6fzg4s2fxf0y1q";
           };
   hotspot = fetchurl {
+             name = "hotspot-${repover}.tar.gz";
              url = "${baseurl}/hotspot/archive/${repover}.tar.gz";
-             sha256 = "0sgr9df10hs49pjld6c6kr374v4zwd9s52pc3drz68zrlk71ja4s";
+             sha256 = if stdenv.isAarch64 then "1dqrzg2af94pjam6jg9nq8ydaibn4bsjv7ai6m7m3r2ph2fml80s"
+                      else "1g512xrrxvnrk5szg7wqqz00x4gv53dx3yffk5im2zfcalyka2q7";
           };
   corba = fetchurl {
+             name = "corba-${repover}.tar.gz";
              url = "${baseurl}/corba/archive/${repover}.tar.gz";
-             sha256 = "1hq0sr4k4k4iv815kg72i9lvd7n7mn5pmw96ckk9p1rnyagn9z03";
+             sha256 = if stdenv.isAarch64 then "15l1ccvk2slx8wf5gilzjvhc428hl57gg1knbma1jqgs3ymnqwpr"
+                      else "0h8nprfzpy21mfl39fxxzfa420skwmaaji4r31j7lj3g8c1wp62r";
           };
   jdk = fetchurl {
+             name = "jdk-${repover}.tar.gz";
              url = "${baseurl}/jdk/archive/${repover}.tar.gz";
-             sha256 = "1fc59jrbfq8l067mggzy5dnrvni7lwaqd7hahs4nqv87kyrfg545";
+             sha256 = if stdenv.isAarch64 then "179ij3rs1ahl6dh3n64k4xp2prv413ckqk7sj1g5lw48rj7bjh83"
+                      else "1sb38h0rckgkr2y0kfzav6mb74nv5whb9l8m842mv1jpavxrdv6k";
           };
   jaxws = fetchurl {
+             name = "jaxws-${repover}.tar.gz";
              url = "${baseurl}/jaxws/archive/${repover}.tar.gz";
-             sha256 = "1ka2fvyxdmpfhk814s314gx53yvdr19vpsqygx283v9nbq90l1yg";
+             sha256 = if stdenv.isAarch64 then "16bayw7c4vzm9s0ixhw2dv6pan6wywyiddh9a8dss35660dnhrm0"
+                      else "0akn5zapff5m32ibgm3f4lhgq96bsqx74g4xl38xmivvxddsd6kz";
           };
   jaxp = fetchurl {
+             name = "jaxp-${repover}.tar.gz";
              url = "${baseurl}/jaxp/archive/${repover}.tar.gz";
-             sha256 = "15vlgs5v2ax8sqwh7bg50fnlrwlpnkp0myzrvpqs1mcza8pyasp8";
+             sha256 = if stdenv.isAarch64 then "176db7pi2irc7q87c273cjm5nrlj5g973fjmh24m6a1jxanrrm9x"
+                      else "0bw4q8yhmrl8hqlimy1ijnarav4r91dj73lpr7axba77rqlr41c8";
           };
   nashorn = fetchurl {
+             name = "nashorn-${repover}.tar.gz";
              url = "${baseurl}/nashorn/archive/${repover}.tar.gz";
-             sha256 = "1jzn0yi0v6lda5y8ib07g1p6zymnbcx9yy6iz8niggpm7205y93h";
+             sha256 = if stdenv.isAarch64 then "0vi3kbsqfpdjxc08ayxk2c87zycd7z0qbqw9xka1vc59iyv97n62"
+                      else "0bfcf3iv2lr0xlp6sclxq7zz7b9ahajl008hz5rasjnrnr993qja";
           };
   openjdk8 = stdenv.mkDerivation {
-    name = "openjdk-8u${update}-${build}";
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "8u${update}-${build}";
 
     srcs = [ jdk8 langtools hotspot corba jdk jaxws jaxp nashorn ];
     sourceRoot = ".";
@@ -67,15 +87,15 @@ let
 
     nativeBuildInputs = [ pkgconfig ];
     buildInputs = [
-      cpio file which unzip zip perl bootjdk zlib cups freetype alsaLib
+      cpio file which unzip zip perl openjdk8-bootstrap zlib cups freetype alsaLib
       libjpeg giflib libX11 libICE libXext libXrender libXtst libXt libXtst
-      libXi libXinerama libXcursor libXrandr lndir fontconfig
-    ] ++ lib.optionals (!minimal && enableGnome2) [
+      libXi libXinerama libXcursor libXrandr fontconfig
+    ] ++ lib.optionals (!headless && 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
+    # 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 jdk8u\*);
       find . -maxdepth 1 -name \*jdk\* -not -name jdk8u\* | awk -F- '{print $1}' | while read p; do
@@ -88,10 +108,10 @@ let
       ./fix-java-home-jdk8.patch
       ./read-truststore-from-env-jdk8.patch
       ./currency-date-range-jdk8.patch
-    ] ++ lib.optionals (!minimal && enableInfinality) [
+    ] ++ lib.optionals (!headless && enableInfinality) [
       ./004_add-fontconfig.patch
       ./005_enable-infinality.patch
-    ] ++ lib.optionals (!minimal && enableGnome2) [
+    ] ++ lib.optionals (!headless && enableGnome2) [
       ./swing-use-gtk-jdk8.patch
     ];
 
@@ -103,33 +123,39 @@ let
       substituteInPlace configure --replace /bin/bash "${bash}/bin/bash"
       substituteInPlace hotspot/make/linux/adlc_updater --replace /bin/sh "${stdenv.shell}"
       substituteInPlace hotspot/make/linux/makefiles/dtrace.make --replace /usr/include/sys/sdt.h "/no-such-path"
-    ''
-    # 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"
     '';
 
     configureFlags = [
-      "--with-boot-jdk=${bootjdk.home}"
+      "--with-boot-jdk=${openjdk8-bootstrap.home}"
       "--with-update-version=${update}"
       "--with-build-number=${build}"
       "--with-milestone=fcs"
       "--enable-unlimited-crypto"
-      "--disable-debug-symbols"
+      "--with-native-debug-symbols=internal"
       "--disable-freetype-bundling"
       "--with-zlib=system"
       "--with-giflib=system"
       "--with-stdc++lib=dynamic"
+    ] ++ lib.optional headless "--disable-headful";
+
+    separateDebugInfo = true;
 
+    NIX_CFLAGS_COMPILE = [
       # 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\""
-    ] ++ lib.optional minimal "--disable-headful";
+      "-Wno-error=deprecated-declarations"
+    ] ++ lib.optionals stdenv.cc.isGNU [
+      # https://bugzilla.redhat.com/show_bug.cgi?id=1306558
+      # https://github.com/JetBrains/jdk8u/commit/eaa5e0711a43d64874111254d74893fa299d5716
+      "-fno-lifetime-dse"
+      "-fno-delete-null-pointer-checks"
+      "-std=gnu++98"
+      "-Wno-error"
+    ];
 
-    NIX_LDFLAGS= lib.optionals (!minimal) [
+    NIX_LDFLAGS= lib.optionals (!headless) [
       "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
-    ] ++ lib.optionals (!minimal && enableGnome2) [
+    ] ++ lib.optionals (!headless && enableGnome2) [
       "-lgtk-x11-2.0" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
     ];
 
@@ -138,45 +164,39 @@ let
     doCheck = false; # fails with "No rule to make target 'y'."
 
     installPhase = ''
-      mkdir -p $out/lib/openjdk $out/share $jre/lib/openjdk
+      mkdir -p $out/lib
 
-      cp -av build/*/images/j2sdk-image/* $out/lib/openjdk
+      mv build/*/images/j2sdk-image $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/
+      mkdir -p $out/share
+      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/
 
       # Remove crap from the installation.
       rm -rf $out/lib/openjdk/demo $out/lib/openjdk/sample
-      ${lib.optionalString minimal ''
+      ${lib.optionalString headless ''
         rm $out/lib/openjdk/jre/lib/${architecture}/{libjsound,libjsoundalsa,libsplashscreen,libawt*,libfontmanager}.so
         rm $out/lib/openjdk/jre/bin/policytool
         rm $out/lib/openjdk/bin/{policytool,appletviewer}
       ''}
 
-      # Move the JRE to a separate output and setup fallback fonts
-      mv $out/lib/openjdk/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
-      ''}
-      lndir $jre/lib/openjdk/jre $out/lib/openjdk/jre
+      # Move the JRE to a separate output
+      mkdir -p $jre/lib/openjdk
+      mv $out/lib/openjdk/jre $jre/lib/openjdk/jre
+      ln -s $jre/lib/openjdk/jre $out/lib/openjdk/jre
 
-      rm -rf $out/lib/openjdk/jre/bina
-      ln -s $out/lib/openjdk/bin $out/lib/openjdk/jre/bin
-
-      # Make sure cmm/*.pf are not symlinks:
-      # https://youtrack.jetbrains.com/issue/IDEA-147272
-      rm -rf $out/lib/openjdk/jre/lib/cmm
-      ln -s {$jre,$out}/lib/openjdk/jre/lib/cmm
+      # Setup fallback fonts
+      ${lib.optionalString (!headless) ''
+        mkdir -p $jre/lib/openjdk/jre/lib/fonts
+        ln -s ${liberation_ttf}/share/fonts/truetype $jre/lib/openjdk/jre/lib/fonts/fallback
+      ''}
 
       # Remove duplicate binaries.
       for i in $(cd $out/lib/openjdk/bin && echo *); do
@@ -198,12 +218,7 @@ let
       ln -s $jre/lib/openjdk/jre $out/jre
     '';
 
-    # FIXME: this is unnecessary once the multiple-outputs branch is merged.
     preFixup = ''
-      prefix=$jre stripDirs "$STRIP" "$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.
@@ -221,11 +236,12 @@ let
       # Build the set of output library directories to rpath against
       LIBDIRS=""
       for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
         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
+        if [ "$output" = debug ]; then continue; fi
         OUTPUTDIR=$(eval echo \$$output)
         BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
         echo "$BINLIBS" | while read i; do
@@ -233,22 +249,16 @@ let
           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; {
+    disallowedReferences = [ openjdk8-bootstrap ];
+
+    meta = with lib; {
       homepage = http://openjdk.java.net/;
       license = licenses.gpl2;
       description = "The open-source Java Development Kit";
       maintainers = with maintainers; [ edwtjo nequissimus ];
-      platforms = platforms.linux;
+      platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
     };
 
     passthru = {
diff --git a/pkgs/development/compilers/openjdk/default.nix b/pkgs/development/compilers/openjdk/default.nix
index 65c85d055cb..094bd57e6e9 100644
--- a/pkgs/development/compilers/openjdk/default.nix
+++ b/pkgs/development/compilers/openjdk/default.nix
@@ -1,42 +1,33 @@
-{ stdenv, lib, fetchurl, bash, cpio, autoconf, pkgconfig, file, which, unzip, zip, cups, freetype
-, alsaLib, bootjdk, perl, liberation_ttf, fontconfig, zlib, lndir
-, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama, libXcursor, libXrandr
-, libjpeg, giflib
+{ stdenv, lib, fetchurl, bash, pkgconfig, autoconf, cpio, file, which, unzip
+, zip, perl, cups, freetype, alsaLib, libjpeg, giflib, libpng, zlib, lcms2
+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
+, libXcursor, libXrandr, fontconfig, openjdk11
 , setJavaClassPath
-, minimal ? false
-, enableJavaFX ? true, openjfx
+, headless ? false
+, enableJavaFX ? openjfx.meta.available, openjfx
 , enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
 }:
 
 let
-
-  /**
-   * The JDK libraries are in directories that depend on the CPU.
-   */
-  architecture =
-    if stdenv.hostPlatform.system == "i686-linux" then
-      "i386"
-    else "amd64";
-
   major = "12";
   update = ".0.2";
   build = "ga";
-  repover = "jdk-${major}${update}-${build}";
 
-  openjdk = stdenv.mkDerivation {
-    name = "openjdk-${major}${update}-${build}";
+  openjdk = stdenv.mkDerivation rec {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${major}${update}-${build}";
 
     src = fetchurl {
-      url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/${repover}.tar.gz";
+      url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/jdk-${version}.tar.gz";
       sha256 = "1ndlxmikyy298z7lqpr1bd0zxq7yx6xidj8y3c8mw9m9fy64h9c7";
     };
 
-    nativeBuildInputs = [ pkgconfig ];
+    nativeBuildInputs = [ pkgconfig autoconf ];
     buildInputs = [
-      autoconf cpio file which unzip zip perl bootjdk zlib cups freetype alsaLib
-      libjpeg giflib libX11 libICE libXext libXrender libXtst libXt libXtst
-      libXi libXinerama libXcursor libXrandr lndir fontconfig
-    ] ++ lib.optionals (!minimal && enableGnome2) [
+      cpio file which unzip zip perl zlib cups freetype alsaLib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk11
+    ] ++ lib.optionals (!headless && enableGnome2) [
       gtk3 gnome_vfs GConf glib
     ];
 
@@ -53,62 +44,60 @@ let
         url = https://src.fedoraproject.org/rpms/java-openjdk/raw/06c001c7d87f2e9fe4fedeef2d993bcd5d7afa2a/f/rh1673833-remove_removal_of_wformat_during_test_compilation.patch;
         sha256 = "082lmc30x64x583vqq00c8y0wqih3y4r0mp1c4bqq36l22qv6b6r";
       })
-    ] ++ lib.optionals (!minimal && enableGnome2) [
+    ] ++ lib.optionals (!headless && enableGnome2) [
       ./swing-use-gtk-jdk10.patch
     ];
 
-    preConfigure = ''
+    prePatch = ''
       chmod +x configure
-      substituteInPlace configure --replace /bin/bash "${bash}/bin/bash"
-
-      configureFlagsArray=(
-        "--with-boot-jdk=${bootjdk.home}"
-        "--enable-unlimited-crypto"
-        "--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=unused-result"
-    ''
-    + lib.optionalString (architecture == "amd64") " \"--with-jvm-features=zgc\""
-    + lib.optionalString minimal " \"--enable-headless-only\""
-    + lib.optionalString (!minimal && enableJavaFX) " \"--with-import-modules=${openjfx}\""
-    + ");"
-    # 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"
+      patchShebangs --build configure
     '';
 
-    NIX_LDFLAGS= lib.optionals (!minimal) [
+    configureFlags = [
+      "--with-boot-jdk=${openjdk11.home}"
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-libjpeg=system"
+      "--with-giflib=system"
+      "--with-libpng=system"
+      "--with-zlib=system"
+      "--with-lcms=system"
+      "--with-stdc++lib=dynamic"
+    ] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
+      ++ lib.optional headless "--enable-headless-only"
+      ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
+
+    separateDebugInfo = true;
+
+    NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
+
+    NIX_LDFLAGS = lib.optionals (!headless) [
       "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
-    ] ++ lib.optionals (!minimal && enableGnome2) [
+    ] ++ lib.optionals (!headless && enableGnome2) [
       "-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
     ];
 
     buildFlags = [ "all" ];
 
     installPhase = ''
-      mkdir -p $out/lib/openjdk $out/share
+      mkdir -p $out/lib
 
-      cp -av build/*/images/jdk/* $out/lib/openjdk
+      mv 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/
+      mkdir -p $out/share
+      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/
 
       # Remove crap from the installation.
       rm -rf $out/lib/openjdk/demo
-      ${lib.optionalString minimal ''
+      ${lib.optionalString headless ''
         rm $out/lib/openjdk/lib/{libjsound,libfontmanager}.so
       ''}
 
@@ -133,11 +122,12 @@ let
       # Build the set of output library directories to rpath against
       LIBDIRS=""
       for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
         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
+        if [ "$output" = debug ]; then continue; fi
         OUTPUTDIR=$(eval echo \$$output)
         BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
         echo "$BINLIBS" | while read i; do
@@ -145,26 +135,20 @@ let
           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
     '';
 
+    disallowedReferences = [ openjdk11 ];
+
     meta = with stdenv.lib; {
       homepage = http://openjdk.java.net/;
       license = licenses.gpl2;
       description = "The open-source Java Development Kit";
       maintainers = with maintainers; [ edwtjo ];
-      platforms = ["i686-linux" "x86_64-linux"];
+      platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
     };
 
     passthru = {
-      inherit architecture;
+      architecture = "";
       home = "${openjdk}/lib/openjdk";
     };
   };
diff --git a/pkgs/development/compilers/openjdk/openjfx/11.nix b/pkgs/development/compilers/openjdk/openjfx/11.nix
index 223feb1e2a1..e1c94ffb597 100644
--- a/pkgs/development/compilers/openjdk/openjfx/11.nix
+++ b/pkgs/development/compilers/openjdk/openjfx/11.nix
@@ -1,5 +1,6 @@
-{ stdenv, fetchurl, writeText, openjdk, bootjdk, gradleGen, pkgconfig, perl, cmake, gperf
-, gtk2, gtk3, libXtst, libXxf86vm, glib, alsaLib, ffmpeg, python, ruby }:
+{ stdenv, lib, fetchurl, writeText, openjdk11, gradleGen, pkgconfig, perl, cmake
+, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsaLib, ffmpeg, python, ruby
+, openjdk11-bootstrap }:
 
 let
   major = "11";
@@ -7,14 +8,14 @@ let
   build = "1";
   repover = "${major}${update}+${build}";
   gradle_ = (gradleGen.override {
-    java = bootjdk;
+    java = openjdk11-bootstrap;
   }).gradle_4_10;
 
   makePackage = args: stdenv.mkDerivation ({
-    version = "${major}${update}-${repover}";
+    version = "${major}${update}-${build}";
 
     src = fetchurl {
-      url = "http://hg.openjdk.java.net/openjfx/${major}/rt/archive/${repover}.tar.gz";
+      url = "https://hg.openjdk.java.net/openjfx/${major}/rt/archive/${repover}.tar.gz";
       sha256 = "1h7qsylr7rnwnbimqjyn3whszp9kv4h3gpicsrb3mradxc9yv194";
     };
 
@@ -25,7 +26,7 @@ let
 
     config = writeText "gradle.properties" (''
       CONF = Release
-      JDK_HOME = ${bootjdk}/lib/openjdk
+      JDK_HOME = ${openjdk11-bootstrap.home}
     '' + args.gradleProperties or "");
 
     buildPhase = ''
@@ -56,11 +57,11 @@ let
 
     outputHashAlgo = "sha256";
     outputHashMode = "recursive";
-    outputHash =
-      # Downloaded AWT jars differ by platform.
-      if stdenv.system == "x86_64-linux" then "0d4msxswdav1xsfkpr0qd3xgqkcbxzf47v1zdy5jmg5w4bs6a78a"
-      else if stdenv.system == "i686-linux" then "0mjlyf6jvbis7nrm5d394sjv4hjw6k3753hr1nwdxk8skwc3ry08"
-      else throw "Unsupported platform";
+    # Downloaded AWT jars differ by platform.
+    outputHash = {
+      i686-linux = "0mjlyf6jvbis7nrm5d394sjv4hjw6k3753hr1nwdxk8skwc3ry08";
+      x86_64-linux = "0d4msxswdav1xsfkpr0qd3xgqkcbxzf47v1zdy5jmg5w4bs6a78a";
+    }.${stdenv.system} or (throw "Unsupported platform");
   };
 
 in makePackage {
@@ -87,24 +88,20 @@ in makePackage {
   postFixup = ''
     # Remove references to bootstrap.
     find "$out" -name \*.so | while read lib; do
-      new_refs="$(patchelf --print-rpath "$lib" | sed -E 's,:?${bootjdk}[^:]*,,')"
+      new_refs="$(patchelf --print-rpath "$lib" | sed -E 's,:?${openjdk11-bootstrap}[^:]*,,')"
       patchelf --set-rpath "$new_refs" "$lib"
     done
-
-    # Test to make sure that we don't depend on the bootstrap
-    if grep -q -r '${bootjdk}' "$out"; then
-      echo "Extraneous references to ${bootjdk} detected" >&2
-      exit 1
-    fi
   '';
 
+  disallowedReferences = [ openjdk11-bootstrap ];
+
   passthru.deps = deps;
 
   meta = with stdenv.lib; {
     homepage = http://openjdk.java.net/projects/openjfx/;
-    license = openjdk.meta.license;
+    license = openjdk11.meta.license;
     description = "The next-generation Java client toolkit.";
     maintainers = with maintainers; [ abbradar ];
-    platforms = openjdk.meta.platforms;
+    platforms = [ "i686-linux" "x86_64-linux" ];
   };
 }
diff --git a/pkgs/development/compilers/openjdk/openjfx/12.nix b/pkgs/development/compilers/openjdk/openjfx/12.nix
index 266dd7f334e..22c608f36c1 100644
--- a/pkgs/development/compilers/openjdk/openjfx/12.nix
+++ b/pkgs/development/compilers/openjdk/openjfx/12.nix
@@ -1,5 +1,6 @@
-{ stdenv, fetchurl, writeText, openjdk, bootjdk, gradleGen, pkgconfig, perl, cmake, gperf
-, gtk2, gtk3, libXtst, libXxf86vm, glib, alsaLib, ffmpeg, python, ruby }:
+{ stdenv, lib, fetchurl, writeText, openjdk11_headless, openjdk12, gradleGen
+, pkgconfig, perl, cmake, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsaLib
+, ffmpeg, python, ruby }:
 
 let
   major = "12";
@@ -7,14 +8,14 @@ let
   build = "14";
   repover = "${major}${update}+${build}";
   gradle_ = (gradleGen.override {
-    java = bootjdk;
+    java = openjdk11_headless;
   }).gradle_4_10;
 
   makePackage = args: stdenv.mkDerivation ({
-    version = "${major}${update}-${repover}";
+    version = "${major}${update}-${build}";
 
     src = fetchurl {
-      url = "http://hg.openjdk.java.net/openjfx/${major}-dev/rt/archive/${repover}.tar.gz";
+      url = "https://hg.openjdk.java.net/openjfx/${major}/rt/archive/${repover}.tar.gz";
       sha256 = "16jjfjkrg57wsj9mmm52i2kl3byz3ba1f9f8wwc8zwqm4cpjzliz";
     };
 
@@ -25,7 +26,7 @@ let
 
     config = writeText "gradle.properties" (''
       CONF = Release
-      JDK_HOME = ${bootjdk}/lib/openjdk
+      JDK_HOME = ${openjdk11_headless.home}
     '' + args.gradleProperties or "");
 
     buildPhase = ''
@@ -56,11 +57,11 @@ let
 
     outputHashAlgo = "sha256";
     outputHashMode = "recursive";
-    outputHash =
-      # Downloaded AWT jars differ by platform.
-      if stdenv.system == "x86_64-linux" then "1z5qar5l28ja4pkf5l5m48xbv3x1yrnilsv9lpf2j3vkdk9h1nci"
-      else if stdenv.system == "i686-linux" then "0rbygvjc7w197fi5nxldqdrm6mpiyd3n45042g3gd4s5qk08spjd"
-      else throw "Unsupported platform";
+    # Downloaded AWT jars differ by platform.
+    outputHash = {
+      x86_64-linux = "1z5qar5l28ja4pkf5l5m48xbv3x1yrnilsv9lpf2j3vkdk9h1nci";
+      i686-linux = "0rbygvjc7w197fi5nxldqdrm6mpiyd3n45042g3gd4s5qk08spjd";
+    }.${stdenv.system} or (throw "Unsupported platform");
   };
 
 in makePackage {
@@ -87,24 +88,20 @@ in makePackage {
   postFixup = ''
     # Remove references to bootstrap.
     find "$out" -name \*.so | while read lib; do
-      new_refs="$(patchelf --print-rpath "$lib" | sed -E 's,:?${bootjdk}[^:]*,,')"
+      new_refs="$(patchelf --print-rpath "$lib" | sed -E 's,:?${openjdk11_headless}[^:]*,,')"
       patchelf --set-rpath "$new_refs" "$lib"
     done
-
-    # Test to make sure that we don't depend on the bootstrap
-    if grep -q -r '${bootjdk}' "$out"; then
-      echo "Extraneous references to ${bootjdk} detected" >&2
-      exit 1
-    fi
   '';
 
+  disallowedReferences = [ openjdk11_headless ];
+
   passthru.deps = deps;
 
   meta = with stdenv.lib; {
     homepage = http://openjdk.java.net/projects/openjfx/;
-    license = openjdk.meta.license;
+    license = openjdk12.meta.license;
     description = "The next-generation Java client toolkit.";
     maintainers = with maintainers; [ abbradar ];
-    platforms = openjdk.meta.platforms;
+    platforms = [ "i686-linux" "x86_64-linux" ];
   };
 }
diff --git a/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk8.patch b/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk8.patch
index 4902b8e8401..08cf554a18f 100644
--- a/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk8.patch
+++ b/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk8.patch
@@ -1,21 +1,30 @@
-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
-@@ -161,6 +161,7 @@
-         /*
-          * Try:
-          *      javax.net.ssl.trustStore  (if this variable exists, stop)
-+         *      system environment variable JAVAX_NET_SSL_TRUSTSTORE
-          *      jssecacerts
-          *      cacerts
-          *
-@@ -169,6 +169,9 @@
- 
-         try {
-             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);
+--- a/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java	2017-06-26 21:48:25.000000000 -0400
++++ b/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java	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
+      */
+@@ -132,7 +133,8 @@
+                 public TrustStoreDescriptor run() {
+                     // Get the system properties for trust store.
+                     String storePropName = System.getProperty(
+-                            "javax.net.ssl.trustStore", jsseDefaultStore);
++                            "javax.net.ssl.trustStore",
++                            System.getenv("JAVAX_NET_SSL_TRUSTSTORE"));
+                     String storePropType = System.getProperty(
+                             "javax.net.ssl.trustStoreType",
+                             KeyStore.getDefaultType());
+@@ -144,6 +146,9 @@
+                     String temporaryName = "";
+                     File temporaryFile = null;
+                     long temporaryTime = 0L;
++                    if (storePropName == null) {
++                        storePropName = jsseDefaultStore;
++                    }
+                     if (!"NONE".equals(storePropName)) {
+                         String[] fileNames =
+                                 new String[] {storePropName, defaultStore};
diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix
index 5cf48715dae..43a72985dde 100644
--- a/pkgs/development/compilers/rust/bootstrap.nix
+++ b/pkgs/development/compilers/rust/bootstrap.nix
@@ -32,7 +32,7 @@ let
 
   src = fetchurl {
      url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
-     sha256 = hashes."${platform}";
+     sha256 = hashes.${platform};
   };
 
 in callPackage ./binary.nix
diff --git a/pkgs/development/coq-modules/QuickChick/default.nix b/pkgs/development/coq-modules/QuickChick/default.nix
index 874b99f2beb..ed8c7ec6a69 100644
--- a/pkgs/development/coq-modules/QuickChick/default.nix
+++ b/pkgs/development/coq-modules/QuickChick/default.nix
@@ -26,7 +26,7 @@ let params =
       sha256 = "1c34v1k37rk7v0xk2czv5n79mbjxjrm6nh3llg2mpfmdsqi68wf3";
     };
   };
-  param = params."${coq.coq-version}";
+  param = params.${coq.coq-version};
 in
 
 let recent = stdenv.lib.versionAtLeast coq.coq-version "8.8"; in
diff --git a/pkgs/development/coq-modules/Velisarios/default.nix b/pkgs/development/coq-modules/Velisarios/default.nix
index cd7ddfefb84..e7371b6bbf5 100644
--- a/pkgs/development/coq-modules/Velisarios/default.nix
+++ b/pkgs/development/coq-modules/Velisarios/default.nix
@@ -20,7 +20,7 @@ let params =
       sha256 = "0l9885nxy0n955fj1gnijlxl55lyxiv9yjfmz8hmfrn9hl8vv1m2";
     };
   };
-  param = params."${coq.coq-version}";
+  param = params.${coq.coq-version};
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/coq-modules/bignums/default.nix b/pkgs/development/coq-modules/bignums/default.nix
index a074b27ff65..d69eddf75a2 100644
--- a/pkgs/development/coq-modules/bignums/default.nix
+++ b/pkgs/development/coq-modules/bignums/default.nix
@@ -22,7 +22,7 @@ let params = {
         sha256 = "1slw227idwjw9a21vj3s6kal22mrmvvlpg8r7xk590ml99bn6404";
       };
     };
-    param = params."${coq.coq-version}";
+    param = params.${coq.coq-version};
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/coq-modules/category-theory/default.nix b/pkgs/development/coq-modules/category-theory/default.nix
index 3dfa95154d3..e16a873ddc1 100644
--- a/pkgs/development/coq-modules/category-theory/default.nix
+++ b/pkgs/development/coq-modules/category-theory/default.nix
@@ -19,7 +19,7 @@ let
     "8.8" = v20190414;
     "8.9" = v20190414;
   };
-  param = params."${coq.coq-version}";
+  param = params.${coq.coq-version};
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/coq-modules/contribs/default.nix b/pkgs/development/coq-modules/contribs/default.nix
index faf7db09ff9..91fdb8651cc 100644
--- a/pkgs/development/coq-modules/contribs/default.nix
+++ b/pkgs/development/coq-modules/contribs/default.nix
@@ -34,7 +34,7 @@ let mkContrib = repo: revs: param:
       rev = "86ac28259030649ef51460e4de2441c8a1017751";
       sha256 = "09bbk2a7pn0j76mmapl583f8a20zqd3a1m9lkml8rpwml692bzi9";
     };
-  }."${coq.coq-version}";
+  }.${coq.coq-version};
 
   abp = mkContrib "abp" [ "8.5" "8.6" "8.7" ] {
     version = "v8.6.0";
@@ -219,7 +219,7 @@ let mkContrib = repo: revs: param:
       rev = "aa33052c1edfc5a65885942a67c2773b5d96f8cc";
       sha256 = "0mjgfdr9bzsch0dlk4vq1frkaig14dqh46r54cv0l15flxapg0iw";
     };
-  }."${coq.coq-version}";
+  }.${coq.coq-version};
 
   continuations = mkContrib "continuations" [ ] {
     version = "v8.5.0-13-g6885310";
diff --git a/pkgs/development/coq-modules/coq-elpi/default.nix b/pkgs/development/coq-modules/coq-elpi/default.nix
index 04fc428b409..c689cea1a82 100644
--- a/pkgs/development/coq-modules/coq-elpi/default.nix
+++ b/pkgs/development/coq-modules/coq-elpi/default.nix
@@ -7,7 +7,7 @@ let params = {
     sha256 = "188avk9irwjsbs5ya4ka01mpk3vw4397kv2rmsncqrrrsa1pdddk";
   };
 };
-  param = params."${coq.coq-version}";
+  param = params.${coq.coq-version};
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/coq-modules/coq-ext-lib/default.nix b/pkgs/development/coq-modules/coq-ext-lib/default.nix
index cade2bd352e..898272d402b 100644
--- a/pkgs/development/coq-modules/coq-ext-lib/default.nix
+++ b/pkgs/development/coq-modules/coq-ext-lib/default.nix
@@ -8,7 +8,7 @@ let params =
     "8.8" = { version = "0.9.8"; sha256 = "0z1ix855kdjl7zw5ca664h5njd1x8mmvf5wi37fck4dj9dgamwlz"; };
     "8.9" = { version = "0.10.1"; sha256 = "0r1vspad8fb8bry3zliiz4hfj4w1iib1l2gm115a94m6zbiksd95"; };
   };
-  param = params."${coq.coq-version}";
+  param = params.${coq.coq-version};
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/coq-modules/coq-haskell/default.nix b/pkgs/development/coq-modules/coq-haskell/default.nix
index 57f31e1847c..b8a34c49417 100644
--- a/pkgs/development/coq-modules/coq-haskell/default.nix
+++ b/pkgs/development/coq-modules/coq-haskell/default.nix
@@ -26,7 +26,7 @@ let params =
       sha256 = "09dq1vvshhlhgjccrhqgbhnq2hrys15xryfszqq11rzpgvl2zgdv";
     };
   };
-  param = params."${coq.coq-version}";
+  param = params.${coq.coq-version};
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/coq-modules/coqhammer/default.nix b/pkgs/development/coq-modules/coqhammer/default.nix
index 28c651f9b16..83a505017fb 100644
--- a/pkgs/development/coq-modules/coqhammer/default.nix
+++ b/pkgs/development/coq-modules/coqhammer/default.nix
@@ -9,7 +9,7 @@ let
       sha256 = "0hmqwsry8ldg4g4hhwg4b84dgzibpdrg1wwsajhlyqfx3fb3n3b5";
     };
   };
-  param = params."${coq.coq-version}";
+  param = params.${coq.coq-version};
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/coq-modules/coqprime/default.nix b/pkgs/development/coq-modules/coqprime/default.nix
index c67342f1a2f..6228bd4be9d 100644
--- a/pkgs/development/coq-modules/coqprime/default.nix
+++ b/pkgs/development/coq-modules/coqprime/default.nix
@@ -15,7 +15,7 @@ let params =
     "8.9" = v_8_8;
     "8.10" = v_8_8;
     };
-  param = params."${coq.coq-version}"
+  param = params.${coq.coq-version}
 ; in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/coq-modules/dpdgraph/default.nix b/pkgs/development/coq-modules/dpdgraph/default.nix
index e403f7d4fb5..401cb299497 100644
--- a/pkgs/development/coq-modules/dpdgraph/default.nix
+++ b/pkgs/development/coq-modules/dpdgraph/default.nix
@@ -22,7 +22,7 @@ let params = {
     sha256 = "0qvar8gfbrcs9fmvkph5asqz4l5fi63caykx3bsn8zf0xllkwv0n";
   };
 };
-param = params."${coq.coq-version}";
+param = params.${coq.coq-version};
 in
 
 stdenv.mkDerivation {
diff --git a/pkgs/development/coq-modules/equations/default.nix b/pkgs/development/coq-modules/equations/default.nix
index 5446b540fac..38444fe2b06 100644
--- a/pkgs/development/coq-modules/equations/default.nix
+++ b/pkgs/development/coq-modules/equations/default.nix
@@ -32,7 +32,7 @@ let
       sha256 = "1v5kx0xzxzsbs5r4w08rm1lrmjjggnd3ap0sd1my88ds17jzyasd";
     };
   };
-  param = params."${coq.coq-version}";
+  param = params.${coq.coq-version};
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/coq-modules/ltac2/default.nix b/pkgs/development/coq-modules/ltac2/default.nix
index 30917fcb78f..80b167aaa98 100644
--- a/pkgs/development/coq-modules/ltac2/default.nix
+++ b/pkgs/development/coq-modules/ltac2/default.nix
@@ -17,7 +17,7 @@ let params = {
     sha256 = "0xby1kb26r9gcvk5511wqj05fqm9paynwfxlfqkmwkgnfmzk0x73";
   };
 };
-  param = params."${coq.coq-version}";
+  param = params.${coq.coq-version};
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/coq-modules/mathcomp/default.nix b/pkgs/development/coq-modules/mathcomp/default.nix
index d573eca809a..2b653cdaa26 100644
--- a/pkgs/development/coq-modules/mathcomp/default.nix
+++ b/pkgs/development/coq-modules/mathcomp/default.nix
@@ -30,7 +30,7 @@ let
   # COMPUTED using the configuration above (edit with caution) #
   ##############################################################
   default-mathcomp-version = let v = head (
-    filter (mc: mathcomp-coq-versions."${mc}" coq.coq-version)
+    filter (mc: mathcomp-coq-versions.${mc} coq.coq-version)
             mathcomp-version-preference ++ ["0.0.0"]);
      in if v == "0.0.0" then max-mathcomp-version else v;
 
@@ -126,9 +126,9 @@ let
         };
       };
     in
-    {"${mathcomp-pkg}" = stdenv.mkDerivation (attrs // overrides attrs);};
+    {${mathcomp-pkg} = stdenv.mkDerivation (attrs // overrides attrs);};
 
-getAttrOr = a: n: a."${n}" or (throw a.error);
+getAttrOr = a: n: a.${n} or (throw a.error);
 
 mathcompCorePkgs_1_7 = mathcompGen "1.7.0";
 mathcompCorePkgs_1_8 = mathcompGen "1.8.0";
diff --git a/pkgs/development/coq-modules/mathcomp/extra.nix b/pkgs/development/coq-modules/mathcomp/extra.nix
index 0d9557623c3..c342c25a411 100644
--- a/pkgs/development/coq-modules/mathcomp/extra.nix
+++ b/pkgs/development/coq-modules/mathcomp/extra.nix
@@ -139,7 +139,7 @@ packageGen = {
                                else compatibleCoqVersions;
     mc-core-deps = if builtins.isNull core-deps then [ssreflect] else core-deps;
   in
-  { "${package}" = let from = src; in
+  { ${package} = let from = src; in
 
   stdenv.mkDerivation rec {
     inherit version;
@@ -149,7 +149,7 @@ packageGen = {
       owner = owner;
       repo = package;
       rev = version;
-      sha256 = version-sha256."${version}";
+      sha256 = version-sha256.${version};
     } else from;
 
     propagatedBuildInputs = [ coq ] ++ mc-core-deps ++ extra-deps;
@@ -173,7 +173,7 @@ packageGen = {
   };
   };
 
-current-versions = versions."${current-ssreflect.version}" or {};
+current-versions = versions.${current-ssreflect.version} or {};
 
 select = x: mapAttrs (n: pkg: {package = n;} // pkg) (recursiveUpdate param x);
 
@@ -181,14 +181,14 @@ for-version = v: suffix: (mapAttrs' (n: pkg:
         {name = "mathcomp_${suffix}-${n}";
          value = (packageGen ({
              ssreflect = coqPackages."mathcomp-ssreflect_${suffix}";
-           } // pkg))."${n}";})
-        (select versions."${v}"));
+           } // pkg)).${n};})
+        (select versions.${v}));
 
 all = (for-version "1.7.0" "1_7") //
       (for-version "1.8.0" "1_8") //
       (for-version "1.9.0" "1_9") //
      (recurseIntoAttrs (mapDerivationAttrset dontDistribute (
-        mapAttrs' (n: pkg: {name = "mathcomp-${n}"; value = (packageGen pkg)."${n}";})
+        mapAttrs' (n: pkg: {name = "mathcomp-${n}"; value = (packageGen pkg).${n};})
               (select current-versions))));
 in
 {
diff --git a/pkgs/development/coq-modules/paramcoq/default.nix b/pkgs/development/coq-modules/paramcoq/default.nix
index 472d3aeb2d0..a8dd74dd5fb 100644
--- a/pkgs/development/coq-modules/paramcoq/default.nix
+++ b/pkgs/development/coq-modules/paramcoq/default.nix
@@ -15,7 +15,7 @@ let params =
       sha256 = "002xabhjlph394vydw3dx8ipv5ry2nq3py4440bk9a18ljx0w6ll";
     };
   };
-  param = params."${coq.coq-version}";
+  param = params.${coq.coq-version};
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/interpreters/acl2/default.nix b/pkgs/development/interpreters/acl2/default.nix
index d53337aca1a..8d93492209c 100644
--- a/pkgs/development/interpreters/acl2/default.nix
+++ b/pkgs/development/interpreters/acl2/default.nix
@@ -17,8 +17,8 @@ in stdenv.mkDerivation rec {
   src = fetchFromGitHub {
     owner = "acl2-devel";
     repo = "acl2-devel";
-    rev = revs."${version}";
-    sha256 = hashes."${version}";
+    rev = revs.${version};
+    sha256 = hashes.${version};
   };
 
   buildInputs = [ sbcl
diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix
index a7009097a60..62cc77c1253 100644
--- a/pkgs/development/interpreters/ruby/default.nix
+++ b/pkgs/development/interpreters/ruby/default.nix
@@ -88,7 +88,7 @@ let
           (import ./patchsets.nix {
             inherit patchSet useRailsExpress ops;
             patchLevel = ver.patchLevel;
-          })."${ver.majMinTiny}";
+          }).${ver.majMinTiny};
 
         postUnpack = ''
           cp -r ${rubygems} $sourceRoot/rubygems
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
index d538a0969b0..37e38e03b8c 100644
--- a/pkgs/development/libraries/SDL2/default.nix
+++ b/pkgs/development/libraries/SDL2/default.nix
@@ -24,11 +24,11 @@ with stdenv.lib;
 
 stdenv.mkDerivation rec {
   pname = "SDL2";
-  version = "2.0.9";
+  version = "2.0.10";
 
   src = fetchurl {
     url = "https://www.libsdl.org/release/${pname}-${version}.tar.gz";
-    sha256 = "1c94ndagzkdfqaa838yqg589p1nnqln8mv0hpwfhrkbfczf8cl95";
+    sha256 = "0mqxp6w5jhbq6y1j690g9r3gpzwjxh4czaglw8x05l7hl49nqrdl";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/libraries/SDL2/find-headers.patch b/pkgs/development/libraries/SDL2/find-headers.patch
index a6114901055..a6b10ddb7ed 100644
--- a/pkgs/development/libraries/SDL2/find-headers.patch
+++ b/pkgs/development/libraries/SDL2/find-headers.patch
@@ -1,12 +1,13 @@
 diff -ru3 SDL2-2.0.4/sdl2-config.cmake.in SDL2-2.0.4-new/sdl2-config.cmake.in
 --- SDL2-2.0.4/sdl2-config.cmake.in	2016-01-02 22:56:31.000000000 +0300
 +++ SDL2-2.0.4-new/sdl2-config.cmake.in	2016-08-22 05:26:42.420397323 +0300
-@@ -6,5 +6,5 @@
+@@ -6,5 +6,6 @@
  set(SDL2_PREFIX "@prefix@")
  set(SDL2_EXEC_PREFIX "@prefix@")
  set(SDL2_LIBDIR "@libdir@")
 -set(SDL2_INCLUDE_DIRS "@includedir@/SDL2")
 +set(SDL2_INCLUDE_DIRS "@includedir@/SDL2" $ENV{SDL2_PATH})
++separate_arguments(SDL2_INCLUDE_DIRS)
  set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} @SDL_RLD_FLAGS@ @SDL_LIBS@")
 diff -ru3 SDL2-2.0.4/sdl2-config.in SDL2-2.0.4-new/sdl2-config.in
 --- SDL2-2.0.4/sdl2-config.in	2016-01-02 22:56:31.000000000 +0300
diff --git a/pkgs/development/libraries/at-spi2-core/default.nix b/pkgs/development/libraries/at-spi2-core/default.nix
index 7adc84f4786..e7cea235ceb 100644
--- a/pkgs/development/libraries/at-spi2-core/default.nix
+++ b/pkgs/development/libraries/at-spi2-core/default.nix
@@ -5,6 +5,8 @@
 , ninja
 , pkgconfig
 , gobject-introspection
+, gsettings-desktop-schemas
+, makeWrapper
 
 , dbus
 , glib
@@ -27,19 +29,32 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "dev" ];
 
-  nativeBuildInputs = [ meson ninja pkgconfig gobject-introspection ]
+  nativeBuildInputs = [ meson ninja pkgconfig gobject-introspection makeWrapper ]
     # Fixup rpaths because of meson, remove with meson-0.47
     ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
   buildInputs = [ dbus glib libX11 libXtst libXi ];
 
   doCheck = false; # fails with "AT-SPI: Couldn't connect to accessibility bus. Is at-spi-bus-launcher running?"
 
+  # Provide dbus-daemon fallback when it is not already running when
+  # at-spi2-bus-launcher is executed. This allows us to avoid
+  # including the entire dbus closure in libraries linked with
+  # the at-spi2-core libraries.
+  mesonFlags = [ "-Ddbus_daemon=/run/current-system/sw/bin/dbus-daemon" ];
+
   passthru = {
     updateScript = gnome3.updateScript {
       packageName = pname;
     };
   };
 
+  postFixup = ''
+    # Cannot use wrapGAppsHook'due to a dependency cycle
+    wrapProgram $out/libexec/at-spi-bus-launcher \
+      --prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib gnome3.dconf}/lib/gio/modules" \
+      --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}
+  '';
+
   meta = with stdenv.lib; {
     description = "Assistive Technology Service Provider Interface protocol definitions and daemon for D-Bus";
     homepage = https://gitlab.gnome.org/GNOME/at-spi2-core;
diff --git a/pkgs/development/libraries/fflas-ffpack/default.nix b/pkgs/development/libraries/fflas-ffpack/default.nix
index 858bc209391..649a90200e0 100644
--- a/pkgs/development/libraries/fflas-ffpack/default.nix
+++ b/pkgs/development/libraries/fflas-ffpack/default.nix
@@ -30,14 +30,14 @@ stdenv.mkDerivation rec {
     "--with-lapack-libs=-l${blas.linkName}"
   ] ++ stdenv.lib.optionals stdenv.isx86_64 {
     # disable SIMD instructions (which are enabled *when available* by default)
-    "default"        = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
-    "westmere"       = [                                                                        "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
-    "sandybridge"    = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
-    "ivybridge"      = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
-    "haswell"        = [                                                                                                                         "--disable-fma4" ];
-    "broadwell"      = [                                                                                                                         "--disable-fma4" ];
-    "skylake"        = [                                                                                                                         "--disable-fma4" ];
-    "skylake-avx512" = [                                                                                                                         "--disable-fma4" ];
+    default        = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    westmere       = [                                                                        "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    sandybridge    = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    ivybridge      = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    haswell        = [                                                                                                                         "--disable-fma4" ];
+    broadwell      = [                                                                                                                         "--disable-fma4" ];
+    skylake        = [                                                                                                                         "--disable-fma4" ];
+    skylake-avx512 = [                                                                                                                         "--disable-fma4" ];
   }.${stdenv.hostPlatform.platform.gcc.arch or "default"};
 
   doCheck = true;
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix
index 84260f3f57c..cf2dc56b90a 100644
--- a/pkgs/development/libraries/ffmpeg/generic.nix
+++ b/pkgs/development/libraries/ffmpeg/generic.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, pkgconfig, perl, texinfo, yasm
 , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg
 , libssh, libtheora, libva, libdrm, libvorbis, libvpx, lzma, libpulseaudio, soxr
-, x264, x265, xvidcore, zlib, libopus, speex, nv-codec-headers
+, x264, x265, xvidcore, zlib, libopus, speex, nv-codec-headers, dav1d
 , openglSupport ? false, libGLU_combined ? null
 # Build options
 , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime
@@ -145,6 +145,7 @@ stdenv.mkDerivation rec {
       (ifMinVer "2.8" "--enable-libopus")
       "--enable-libspeex"
       (ifMinVer "2.8" "--enable-libx265")
+      (ifMinVer "4.2" (enableFeature (dav1d != null) "libdav1d"))
     # Developer flags
       (enableFeature debugDeveloper "debug")
       (enableFeature optimizationsDeveloper "optimizations")
@@ -170,7 +171,8 @@ stdenv.mkDerivation rec {
     ++ optional isLinux alsaLib
     ++ optionals isDarwin darwinFrameworks
     ++ optional vdpauSupport libvdpau
-    ++ optional sdlSupport (if reqMin "3.2" then SDL2 else SDL);
+    ++ optional sdlSupport (if reqMin "3.2" then SDL2 else SDL)
+    ++ optional (reqMin "4.2") dav1d;
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/libraries/g2o/default.nix b/pkgs/development/libraries/g2o/default.nix
index 909c504870f..21975766e74 100644
--- a/pkgs/development/libraries/g2o/default.nix
+++ b/pkgs/development/libraries/g2o/default.nix
@@ -25,14 +25,14 @@ stdenv.mkDerivation rec {
     "-DQGLVIEWER_INCLUDE_DIR=${libsForQt5.libqglviewer}/include/QGLViewer"
     "-DG2O_BUILD_EXAMPLES=OFF"
   ] ++ lib.optionals stdenv.isx86_64 ([ "-DDO_SSE_AUTODETECT=OFF" ] ++ {
-    "default"        = [ "-DDISABLE_SSE3=ON" "-DDISABLE_SSE4_1=ON" "-DDISABLE_SSE4_2=ON" "-DDISABLE_SSE4_A=ON" ];
-    "westmere"       = [                                                                 "-DDISABLE_SSE4_A=ON" ];
-    "sandybridge"    = [                                                                 "-DDISABLE_SSE4_A=ON" ];
-    "ivybridge"      = [                                                                 "-DDISABLE_SSE4_A=ON" ];
-    "haswell"        = [                                                                 "-DDISABLE_SSE4_A=ON" ];
-    "broadwell"      = [                                                                 "-DDISABLE_SSE4_A=ON" ];
-    "skylake"        = [                                                                 "-DDISABLE_SSE4_A=ON" ];
-    "skylake-avx512" = [                                                                 "-DDISABLE_SSE4_A=ON" ];
+    default        = [ "-DDISABLE_SSE3=ON" "-DDISABLE_SSE4_1=ON" "-DDISABLE_SSE4_2=ON" "-DDISABLE_SSE4_A=ON" ];
+    westmere       = [                                                                 "-DDISABLE_SSE4_A=ON" ];
+    sandybridge    = [                                                                 "-DDISABLE_SSE4_A=ON" ];
+    ivybridge      = [                                                                 "-DDISABLE_SSE4_A=ON" ];
+    haswell        = [                                                                 "-DDISABLE_SSE4_A=ON" ];
+    broadwell      = [                                                                 "-DDISABLE_SSE4_A=ON" ];
+    skylake        = [                                                                 "-DDISABLE_SSE4_A=ON" ];
+    skylake-avx512 = [                                                                 "-DDISABLE_SSE4_A=ON" ];
   }.${stdenv.hostPlatform.platform.gcc.arch or "default"});
 
   postInstall = ''
diff --git a/pkgs/development/libraries/givaro/default.nix b/pkgs/development/libraries/givaro/default.nix
index 79fb7a8d738..4c1e538dcd6 100644
--- a/pkgs/development/libraries/givaro/default.nix
+++ b/pkgs/development/libraries/givaro/default.nix
@@ -18,14 +18,14 @@ stdenv.mkDerivation rec {
     "--disable-optimization"
   ] ++ stdenv.lib.optionals stdenv.isx86_64 {
     # disable SIMD instructions (which are enabled *when available* by default)
-    "default"        = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
-    "westmere"       = [                                                                        "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
-    "sandybridge"    = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
-    "ivybridge"      = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
-    "haswell"        = [                                                                                                                         "--disable-fma4" ];
-    "broadwell"      = [                                                                                                                         "--disable-fma4" ];
-    "skylake"        = [                                                                                                                         "--disable-fma4" ];
-    "skylake-avx512" = [                                                                                                                         "--disable-fma4" ];
+    default        = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    westmere       = [                                                                        "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    sandybridge    = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    ivybridge      = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    haswell        = [                                                                                                                         "--disable-fma4" ];
+    broadwell      = [                                                                                                                         "--disable-fma4" ];
+    skylake        = [                                                                                                                         "--disable-fma4" ];
+    skylake-avx512 = [                                                                                                                         "--disable-fma4" ];
   }.${stdenv.hostPlatform.platform.gcc.arch or "default"};
 
   # On darwin, tests are linked to dylib in the nix store, so we need to make
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index 48e65cc063b..29360585b7e 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -174,8 +174,10 @@ stdenv.mkDerivation rec {
 
   inherit doCheck;
 
-  passthru = {
+  passthru = rec {
     gioModuleDir = "lib/gio/modules";
+    makeSchemaPath = dir: name: "${dir}/share/gsettings-schemas/${name}/glib-2.0/schemas";
+    getSchemaPath = pkg: makeSchemaPath pkg pkg.name;
     inherit flattenInclude;
     updateScript = gnome3.updateScript { packageName = "glib"; };
   };
diff --git a/pkgs/development/libraries/gsl/default.nix b/pkgs/development/libraries/gsl/default.nix
index c8846509d00..1fd086ca23c 100644
--- a/pkgs/development/libraries/gsl/default.nix
+++ b/pkgs/development/libraries/gsl/default.nix
@@ -1,11 +1,11 @@
 { fetchurl, stdenv }:
 
 stdenv.mkDerivation rec {
-  name = "gsl-2.5";
+  name = "gsl-2.6";
 
   src = fetchurl {
     url = "mirror://gnu/gsl/${name}.tar.gz";
-    sha256 = "1395y9hlhqadn5g9j8q22224fds5sd92jxi9czfavjj24myasq04";
+    sha256 = "1a460zj9xmbgvcymkdhqh313c4l29mn9cffbi5vf33x3qygk70mp";
   };
 
   # do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html)
diff --git a/pkgs/development/libraries/java/swt/default.nix b/pkgs/development/libraries/java/swt/default.nix
index 591de48d319..a93d7774291 100644
--- a/pkgs/development/libraries/java/swt/default.nix
+++ b/pkgs/development/libraries/java/swt/default.nix
@@ -5,13 +5,13 @@
 
 let
   platformMap = {
-    "x86_64-linux" =
+    x86_64-linux =
       { platform = "gtk-linux-x86_64";
         sha256 = "1qq0pjll6030v4ml0hifcaaik7sx3fl7ghybfdw95vsvxafwp2ff"; };
-    "i686-linux" =
+    i686-linux =
       { platform = "gtk-linux-x86";
         sha256 = "03mhzraikcs4fsz7d3h5af9pw1bbcfd6dglsvbk2ciwimy9zj30q"; };
-    "x86_64-darwin" =
+    x86_64-darwin =
       { platform = "cocoa-macosx-x86_64";
         sha256 = "00k1mfbncvyh8klgmk0891w8jwnd5niqb16j1j8yacrm2smmlb05"; };
   };
diff --git a/pkgs/development/libraries/kde-frameworks/default.nix b/pkgs/development/libraries/kde-frameworks/default.nix
index e8a7aa7322f..ef1171b1760 100644
--- a/pkgs/development/libraries/kde-frameworks/default.nix
+++ b/pkgs/development/libraries/kde-frameworks/default.nix
@@ -64,7 +64,7 @@ let
           let
 
             inherit (args) name;
-            inherit (srcs."${name}") src version;
+            inherit (srcs.${name}) src version;
 
             outputs = args.outputs or [ "bin" "dev" "out" ];
             hasSeparateDev = lib.elem "dev" outputs;
diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix
index 29d59659f90..11fb21fe52e 100644
--- a/pkgs/development/libraries/libdrm/default.nix
+++ b/pkgs/development/libraries/libdrm/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchurl, pkgconfig, meson, ninja, libpthreadstubs, libpciaccess, valgrind-light }:
+{ stdenv, lib, fetchurl, pkgconfig, meson, ninja, libpthreadstubs, libpciaccess
+, withValgrind ? valgrind-light.meta.available, valgrind-light
+}:
 
 stdenv.mkDerivation rec {
   pname = "libdrm";
@@ -12,7 +14,8 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "dev" "bin" ];
 
   nativeBuildInputs = [ pkgconfig meson ninja ];
-  buildInputs = [ libpthreadstubs libpciaccess valgrind-light ];
+  buildInputs = [ libpthreadstubs libpciaccess ]
+    ++ lib.optional withValgrind valgrind-light;
 
   patches = [ ./cross-build-nm-path.patch ];
 
@@ -22,14 +25,14 @@ stdenv.mkDerivation rec {
     done
   '';
 
-  mesonFlags =
-    [
-      "-Dnm-path=${stdenv.cc.targetPrefix}nm"
-      "-Dinstall-test-programs=true" ]
-    ++ stdenv.lib.optionals (stdenv.isAarch32 || stdenv.isAarch64)
-      [ "-Dtegra=true" "-Detnaviv=true" ]
-    ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-Dintel=false"
-    ;
+  mesonFlags = [
+    "-Dnm-path=${stdenv.cc.targetPrefix}nm"
+    "-Dinstall-test-programs=true"
+    "-Domap=true"
+  ] ++ lib.optionals (stdenv.isAarch32 || stdenv.isAarch64) [
+    "-Dtegra=true"
+    "-Detnaviv=true"
+  ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-Dintel=false";
 
   enableParallelBuilding = true;
 
@@ -37,6 +40,6 @@ stdenv.mkDerivation rec {
     homepage = https://dri.freedesktop.org/libdrm/;
     description = "Library for accessing the kernel's Direct Rendering Manager";
     license = "bsd";
-    platforms = stdenv.lib.platforms.unix;
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/libgee/default.nix b/pkgs/development/libraries/libgee/default.nix
index 260c3a3d97b..b9e1d668cd3 100644
--- a/pkgs/development/libraries/libgee/default.nix
+++ b/pkgs/development/libraries/libgee/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libgee";
-  version = "0.20.1";
+  version = "0.20.2";
 
   outputs = [ "out" "dev" ];
 
   src = fetchurl {
     url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "0c26x8gi3ivmhlbqcmiag4jwrkvcy28ld24j55nqr3jikb904a5v";
+    sha256 = "0g1mhl7nidg82v4cikkk8dakzc18hg7wv0dsf2pbyijzfm5mq0wy";
   };
 
   doCheck = true;
diff --git a/pkgs/development/libraries/libglvnd/default.nix b/pkgs/development/libraries/libglvnd/default.nix
index ed6139d48f6..2b64d5b7220 100644
--- a/pkgs/development/libraries/libglvnd/default.nix
+++ b/pkgs/development/libraries/libglvnd/default.nix
@@ -43,10 +43,11 @@ stdenv.mkDerivation rec {
     });
   outputs = [ "out" "dev" ];
 
-  # Set RUNPATH so that driver libraries in /run/opengl-driver(-32)/lib can be found.
-  # See the explanation in addOpenGLRunpath.
+  # Set RUNPATH so that libGLX can find driver libraries in /run/opengl-driver(-32)/lib.
+  # Note that libEGL does not need it because it uses driver config files which should
+  # contain absolute paths to libraries.
   postFixup = ''
-    addOpenGLRunpath $out/lib/libGLX.so $out/lib/libEGL.so
+    addOpenGLRunpath $out/lib/libGLX.so
   '';
 
   passthru = { inherit (addOpenGLRunpath) driverLink; };
diff --git a/pkgs/development/libraries/libheif/1.4.0-CVE-2019-11471.patch b/pkgs/development/libraries/libheif/1.4.0-CVE-2019-11471.patch
deleted file mode 100644
index 2ea1b124ce7..00000000000
--- a/pkgs/development/libraries/libheif/1.4.0-CVE-2019-11471.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Adapted from upstream commit 995a4283d8ed2d0d2c1ceb1a577b993df2f0e014
---- a/libheif/heif_context.cc
-+++ b/libheif/heif_context.cc
-@@ -571,6 +571,11 @@
-             image->set_is_alpha_channel_of(refs[0]);
- 
-             auto master_iter = m_all_images.find(refs[0]);
-+            if (master_iter == m_all_images.end()) {
-+              return Error(heif_error_Invalid_input,
-+                           heif_suberror_Nonexisting_item_referenced,
-+                           "Non-existing alpha image referenced");
-+            }
-             master_iter->second->set_alpha_channel(image);
-           }
-
diff --git a/pkgs/development/libraries/libheif/default.nix b/pkgs/development/libraries/libheif/default.nix
index 7e1bb2daa9e..02c4dd33481 100644
--- a/pkgs/development/libraries/libheif/default.nix
+++ b/pkgs/development/libraries/libheif/default.nix
@@ -1,18 +1,16 @@
 { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libde265, x265, libpng, libjpeg }:
 
 stdenv.mkDerivation rec {
-  version = "1.4.0";
   pname = "libheif";
+  version = "1.5.0";
 
   src = fetchFromGitHub {
     owner = "strukturag";
     repo = "libheif";
     rev = "v${version}";
-    sha256 = "0vbjknkb2ccmw3xh2j8ljz5sj9i8wv92iw7zghcc5wn64sk1xkk2";
+    sha256 = "1nvfjmnha06689imm8v24nlc011814gc9xq3x54cnmqvh5gn98ah";
   };
 
-  patches = [ ./1.4.0-CVE-2019-11471.patch ];
-
   nativeBuildInputs = [ autoreconfHook pkgconfig ];
   buildInputs = [ libde265 x265 libpng libjpeg ];
 
diff --git a/pkgs/development/libraries/libical/default.nix b/pkgs/development/libraries/libical/default.nix
index d8881b929a0..050cba5460d 100644
--- a/pkgs/development/libraries/libical/default.nix
+++ b/pkgs/development/libraries/libical/default.nix
@@ -1,34 +1,64 @@
-{ stdenv, fetchFromGitHub, perl, pkgconfig, cmake, ninja, vala, gobject-introspection
-, python3, tzdata, glib, libxml2, icu }:
+{ stdenv
+, fetchFromGitHub
+, cmake
+, glib
+, gobject-introspection
+, icu
+, libxml2
+, ninja
+, perl
+, pkgconfig
+, python3
+, tzdata
+, vala
+}:
 
 stdenv.mkDerivation rec {
   pname = "libical";
-  version = "3.0.4";
+  version = "3.0.5";
 
-  outputs = [ "out" "dev" ]; #"devdoc" ];
+  outputs = [ "out" "dev" ]; # "devdoc" ];
 
   src = fetchFromGitHub {
     owner = "libical";
     repo = "libical";
     rev = "v${version}";
-    sha256 = "1qgpbdjd6jsivw87v5w52268kqp0rv780kli8cgb3ndlv592wlbm";
+    sha256 = "03kjc4s1svmzkmzkr0irgczq37aslhj4bxnvjqav0jwa2zrynhra";
   };
 
   nativeBuildInputs = [
-    perl pkgconfig cmake ninja vala gobject-introspection
-    (python3.withPackages (pkgs: with pkgs; [ pygobject3 ])) # running libical-glib tests
-# Docs building fails: https://github.com/NixOS/nixpkgs/pull/61657#issuecomment-495579489
-#    gtk-doc docbook_xsl docbook_xml_dtd_43 # docs
+    cmake
+    gobject-introspection
+    ninja
+    perl
+    pkgconfig
+    vala
+    # Docs building fails:
+    # https://github.com/NixOS/nixpkgs/pull/67204
+    # previously with https://github.com/NixOS/nixpkgs/pull/61657#issuecomment-495579489
+    # gtk-doc docbook_xsl docbook_xml_dtd_43 # for docs
+  ];
+  installCheckInputs = [
+    # running libical-glib tests
+    (python3.withPackages (pkgs: with pkgs; [
+      pygobject3
+    ]))
+  ];
+
+  buildInputs = [
+    glib
+    libxml2
+    icu
   ];
-  buildInputs = [ glib libxml2 icu ];
 
   cmakeFlags = [
     "-DGOBJECT_INTROSPECTION=True"
+    "-DENABLE_GTK_DOC=False"
     "-DICAL_GLIB_VAPI=True"
   ];
 
   patches = [
-    # TODO: upstream this patch
+    # Will appear in 3.1.0
     # https://github.com/libical/libical/issues/350
     ./respect-env-tzdir.patch
   ];
diff --git a/pkgs/development/libraries/linbox/default.nix b/pkgs/development/libraries/linbox/default.nix
index f5cb197dfe5..8635b8c412f 100644
--- a/pkgs/development/libraries/linbox/default.nix
+++ b/pkgs/development/libraries/linbox/default.nix
@@ -37,14 +37,14 @@ stdenv.mkDerivation rec {
     "--disable-optimization"
   ] ++ stdenv.lib.optionals stdenv.isx86_64 {
     # disable SIMD instructions (which are enabled *when available* by default)
-    "default"        = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
-    "westmere"       = [                                                                        "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
-    "sandybridge"    = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
-    "ivybridge"      = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
-    "haswell"        = [                                                                                                                         "--disable-fma4" ];
-    "broadwell"      = [                                                                                                                         "--disable-fma4" ];
-    "skylake"        = [                                                                                                                         "--disable-fma4" ];
-    "skylake-avx512" = [                                                                                                                         "--disable-fma4" ];
+    default        = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    westmere       = [                                                                        "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    sandybridge    = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    ivybridge      = [                                                                                        "--disable-avx2" "--disable-fma" "--disable-fma4" ];
+    haswell        = [                                                                                                                         "--disable-fma4" ];
+    broadwell      = [                                                                                                                         "--disable-fma4" ];
+    skylake        = [                                                                                                                         "--disable-fma4" ];
+    skylake-avx512 = [                                                                                                                         "--disable-fma4" ];
   }.${stdenv.hostPlatform.platform.gcc.arch or "default"}
   ++ stdenv.lib.optionals withSage [
     "--enable-sage"
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index 7610b15296e..117722ae16a 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -27,7 +27,7 @@
 with stdenv.lib;
 
 let
-  version = "19.1.3";
+  version = "19.1.5";
   branch  = head (splitString "." version);
 in
 
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
       "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
       "https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz"
     ];
-    sha256 = "1q5p4mw7zrklwx1is09knnb762zzk33xwhwp99fw25ax4ar60m44";
+    sha256 = "1d3frncljickn5yi2ch1w2phwxhxpi6diyac3cbin9f76m7f2m3v";
   };
 
   prePatch = "patchShebangs .";
diff --git a/pkgs/development/libraries/ocl-icd/default.nix b/pkgs/development/libraries/ocl-icd/default.nix
index 6cab843a22b..84205253554 100644
--- a/pkgs/development/libraries/ocl-icd/default.nix
+++ b/pkgs/development/libraries/ocl-icd/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "0f14gpa13sdm0kzqv5yycp4pschbmi6n5fj7wl4ilspzsrqcgqr2";
   };
 
-  nativeBuildInputs = [ ruby addOpenGLRunpath ];
+  nativeBuildInputs = [ ruby ];
 
   buildInputs = [ opencl-headers ];
 
@@ -17,12 +17,6 @@ stdenv.mkDerivation rec {
     sed -i 's,"/etc/OpenCL/vendors","${addOpenGLRunpath.driverLink}/etc/OpenCL/vendors",g' ocl_icd_loader.c
   '';
 
-  # Set RUNPATH so that driver libraries in /run/opengl-driver(-32)/lib can be found.
-  # See the explanation in addOpenGLRunpath.
-  postFixup = ''
-    addOpenGLRunpath $out/lib/libOpenCL.so
-  '';
-
   meta = with stdenv.lib; {
     description = "OpenCL ICD Loader for ${opencl-headers.name}";
     homepage    = https://forge.imag.fr/projects/ocl-icd/;
diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix
index bd4802b8775..84cfb47b554 100644
--- a/pkgs/development/libraries/openssl/default.nix
+++ b/pkgs/development/libraries/openssl/default.nix
@@ -44,10 +44,10 @@ let
     # TODO(@Ericson2314): Improve with mass rebuild
     configurePlatforms = [];
     configureScript = {
-        "x86_64-darwin"  = "./Configure darwin64-x86_64-cc";
-        "x86_64-solaris" = "./Configure solaris64-x86_64-gcc";
-        "armv6l-linux" = "./Configure linux-armv4 -march=armv6";
-        "armv7l-linux" = "./Configure linux-armv4 -march=armv7-a";
+        x86_64-darwin  = "./Configure darwin64-x86_64-cc";
+        x86_64-solaris = "./Configure solaris64-x86_64-gcc";
+        armv6l-linux = "./Configure linux-armv4 -march=armv6";
+        armv7l-linux = "./Configure linux-armv4 -march=armv7-a";
       }.${stdenv.hostPlatform.system} or (
         if stdenv.hostPlatform == stdenv.buildPlatform
           then "./config"
diff --git a/pkgs/development/libraries/oracle-instantclient/default.nix b/pkgs/development/libraries/oracle-instantclient/default.nix
index 06b9e360d1a..ea4ee44eb2d 100644
--- a/pkgs/development/libraries/oracle-instantclient/default.nix
+++ b/pkgs/development/libraries/oracle-instantclient/default.nix
@@ -51,9 +51,9 @@ let
 
   # convert platform to oracle architecture names
   arch = {
-    "x86_64-linux" = "linux.x64";
-    "x86_64-darwin" = "macos.x64";
-  }."${stdenv.hostPlatform.system}" or throwSystem;
+    x86_64-linux = "linux.x64";
+    x86_64-darwin = "macos.x64";
+  }.${stdenv.hostPlatform.system} or throwSystem;
 
   # calculate the filename of a single zip file
   srcFilename = component: arch: version: rel:
diff --git a/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh b/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh
index e7d7d132617..eb6e7715385 100644
--- a/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh
+++ b/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh
@@ -82,7 +82,7 @@ wrapQtAppsHook() {
 
         find "$targetDir" -executable -print0 | while IFS= read -r -d '' file
         do
-            isELF "$file" || continue
+            isELFExec "$file" || continue
 
             if [ -f "$file" ]
             then
diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix
index 8250e42a1b6..e2c71a77062 100644
--- a/pkgs/development/libraries/qt-5/modules/qtbase.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix
@@ -255,14 +255,14 @@ stdenv.mkDerivation {
       if (!stdenv.hostPlatform.isx86_64)
       then [ "-no-sse2" ]
       else lib.optionals (compareVersion "5.9.0" >= 0) {
-        "default"        = [ "-sse2" "-no-sse3" "-no-ssse3" "-no-sse4.1" "-no-sse4.2" "-no-avx" "-no-avx2" ];
-        "westmere"       = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2" "-no-avx" "-no-avx2" ];
-        "sandybridge"    = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx" "-no-avx2" ];
-        "ivybridge"      = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx" "-no-avx2" ];
-        "haswell"        = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
-        "broadwell"      = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
-        "skylake"        = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
-        "skylake-avx512" = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
+        default        = [ "-sse2" "-no-sse3" "-no-ssse3" "-no-sse4.1" "-no-sse4.2" "-no-avx" "-no-avx2" ];
+        westmere       = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2" "-no-avx" "-no-avx2" ];
+        sandybridge    = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx" "-no-avx2" ];
+        ivybridge      = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx" "-no-avx2" ];
+        haswell        = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
+        broadwell      = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
+        skylake        = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
+        skylake-avx512 = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
       }.${stdenv.hostPlatform.platform.gcc.arch or "default"}
     )
     ++ [
diff --git a/pkgs/development/libraries/qt-5/qtModule.nix b/pkgs/development/libraries/qt-5/qtModule.nix
index 84a9d30918b..5003205ef37 100644
--- a/pkgs/development/libraries/qt-5/qtModule.nix
+++ b/pkgs/development/libraries/qt-5/qtModule.nix
@@ -8,14 +8,14 @@ args:
 
 let
   inherit (args) name;
-  version = args.version or srcs."${name}".version;
-  src = args.src or srcs."${name}".src;
+  version = args.version or srcs.${name}.version;
+  src = args.src or srcs.${name}.src;
 in
 
 mkDerivation (args // {
   name = "${name}-${version}";
   inherit src;
-  patches = args.patches or patches."${name}" or [];
+  patches = args.patches or patches.${name} or [];
 
   nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl self.qmake ];
   propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);
diff --git a/pkgs/development/libraries/science/math/tensorflow/binary-hashes.nix b/pkgs/development/libraries/science/math/tensorflow/binary-hashes.nix
index 892dfa2a609..76f0c5eea7f 100644
--- a/pkgs/development/libraries/science/math/tensorflow/binary-hashes.nix
+++ b/pkgs/development/libraries/science/math/tensorflow/binary-hashes.nix
@@ -1,14 +1,14 @@
 {
 version = "1.14.0";
-"cpu-linux-x86_64" = {
+cpu-linux-x86_64 = {
   url = "https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.14.0.tar.gz";
   sha256 = "04bi3ijq4sbb8c5vk964zlv0j9mrjnzzxd9q9knq3h273nc1a36k";
 };
-"gpu-linux-x86_64" = {
+gpu-linux-x86_64 = {
   url = "https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-1.14.0.tar.gz";
   sha256 = "1ffnpyj9jjgwxpjfiyjvq4dm3n6nwiksim5jld9zw7fdswh215x6";
 };
-"cpu-darwin-x86_64" = {
+cpu-darwin-x86_64 = {
   url = "https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-darwin-x86_64-1.14.0.tar.gz";
   sha256 = "0zsd5ils1a17j6jzh0c7q1z56fw46gkzybbnms7h2rgg8al0rh92";
 };
diff --git a/pkgs/development/libraries/v8/5_x.nix b/pkgs/development/libraries/v8/5_x.nix
index cb53765e394..050abe9e81b 100644
--- a/pkgs/development/libraries/v8/5_x.nix
+++ b/pkgs/development/libraries/v8/5_x.nix
@@ -17,7 +17,7 @@ let
   sharedFlag = if static then "static_library" else "shared_library";
 
   deps = {
-    "build" = fetchgit {
+    build = fetchgit {
       url = "${git_url}/chromium/src/build.git";
       rev = "2c67d4d74b6b3673228fab191918500a582ef3b0";
       sha256 = "0jc7hci5yh792pw0ahjfxrk5xzllnlrv9llmwlgcgn2x8x6bn34q";
@@ -32,7 +32,7 @@ let
       rev = "b5ecbb29a26532f72ef482569b223d5a51fd50bf";
       sha256 = "0ld47wdnk8grcba221z67l3pnphv9zwifk4y44f5b946w3iwmpns";
     };
-    "buildtools" = fetchgit {
+    buildtools = fetchgit {
       url = "${git_url}/chromium/buildtools.git";
       rev = "60f7f9a8b421ebf9a46041dfa2ff11c0fe59c582";
       sha256 = "0i10bw7yhslklqwcx5krs3k05sicb73cpwd0mkaz96yxsvmkvjq0";
diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix
index 2d9c5d4b92a..e367d8242de 100644
--- a/pkgs/development/libraries/v8/default.nix
+++ b/pkgs/development/libraries/v8/default.nix
@@ -14,7 +14,7 @@ let
       rev    = "936ba8a963284a6b3737cf2f0474a7131073abee";
       sha256 = "14nr22fqdpxma1kzjflj6a865vr3hfnnm2gs4vcixyq4kmfzfcy2";
     };
-    "build" = fetchgit {
+    build = fetchgit {
       url    = "${git_url}/chromium/src/build.git";
       rev    = "325e95d6dae64f35b160b3dc7d73218cee5ec079";
       sha256 = "0dddyxa76p2xpjhmxif05v63i5ar6h5v684fdl667sg84f5bhhxf";
diff --git a/pkgs/development/libraries/v8/plv8_6_x.nix b/pkgs/development/libraries/v8/plv8_6_x.nix
index bda3f07f0a4..f1155c41c12 100644
--- a/pkgs/development/libraries/v8/plv8_6_x.nix
+++ b/pkgs/development/libraries/v8/plv8_6_x.nix
@@ -24,12 +24,12 @@ let
       rev    = "0e9a47d74970bee1bbfc063c47215406f8918699";
       sha256 = "07rbzrlscp8adh4z86yl5jxdnvgkc3xs950xldpk318wf9i3bh6c";
     };
-    "build" = fetchgit {
+    build = fetchgit {
       url    = "${git_url}/chromium/src/build.git";
       rev    = "9338ce52d0b9bcef34c38285fbd5023b62739fac";
       sha256 = "1s2sa8dy3waidsirjylc82ggb18l1108bczjc8z0v4ywyj4k0cvh";
     };
-    "buildtools" = fetchgit {
+    buildtools = fetchgit {
       url    = "${git_url}/chromium/buildtools.git";
       rev    = "505de88083136eefd056e5ee4ca0f01fe9b33de8";
       sha256 = "0vj216nhb803bggsl0hnyagj8njrm96pn8sim6xcnqb7nhz1vabw";
diff --git a/pkgs/development/libraries/vulkan-loader/default.nix b/pkgs/development/libraries/vulkan-loader/default.nix
index d8b94c40c7e..95d420627c7 100644
--- a/pkgs/development/libraries/vulkan-loader/default.nix
+++ b/pkgs/development/libraries/vulkan-loader/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
     sha256 = "0zhrwj1gi90x2w8gaaaw5h4b969a8gfy244kn0drrplhhb1nqz3b";
   };
 
-  nativeBuildInputs = [ pkgconfig addOpenGLRunpath ];
+  nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ cmake python3 xlibsWrapper libxcb libXrandr libXext wayland ];
   enableParallelBuilding = true;
 
@@ -30,12 +30,6 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "dev" ];
 
-  # Set RUNPATH so that driver libraries in /run/opengl-driver(-32)/lib can be found.
-  # See the explanation in addOpenGLRunpath.
-  postFixup = ''
-    addOpenGLRunpath $out/lib/libvulkan.so
-  '';
-
   meta = with stdenv.lib; {
     description = "LunarG Vulkan loader";
     homepage    = https://www.lunarg.com;
diff --git a/pkgs/development/libraries/wavpack/default.nix b/pkgs/development/libraries/wavpack/default.nix
index f3f87b3ba60..cd0b8bdb29d 100644
--- a/pkgs/development/libraries/wavpack/default.nix
+++ b/pkgs/development/libraries/wavpack/default.nix
@@ -69,6 +69,16 @@ stdenv.mkDerivation rec {
       name = "CVE-2019-1010319.patch";
       sha256 = "011sqdgpykilaj2c4ns298z7aad03yprpva0dqr39nx88ji6jnrb";
     })
+    (fetchpatch {
+      url = "https://github.com/dbry/WavPack/commit/36a24c7881427d2e1e4dc1cef58f19eee0d13aec.patch";
+      name = "CVE-2018-7253.patch";
+      sha256 = "130kvmlpaj6x1pm6qzdzrmf4xzhp0pj29qrardb76zcfinx5pk2n";
+    })
+    (fetchpatch {
+      url = "https://github.com/dbry/WavPack/commit/8e3fe45a7bac31d9a3b558ae0079e2d92a04799e.patch";
+      name = "CVE-2018-7254.patch";
+      sha256 = "06fdzw2cbdj8ajf171z1g53cl6bf1cdh2czswqldrqqvv3jkzk77";
+    })
   ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/libraries/wayland/protocols.nix b/pkgs/development/libraries/wayland/protocols.nix
index d2af8b084e6..0b367f4a930 100644
--- a/pkgs/development/libraries/wayland/protocols.nix
+++ b/pkgs/development/libraries/wayland/protocols.nix
@@ -4,11 +4,11 @@
 
 stdenv.mkDerivation rec {
   pname = "wayland-protocols";
-  version = "1.17";
+  version = "1.18";
 
   src = fetchurl {
     url = "https://wayland.freedesktop.org/releases/${pname}-${version}.tar.xz";
-    sha256 = "0bw1sqixqk2a7mqw630cs4dlgcp5yib90vyikzm3lr05jz7ij4yz";
+    sha256 = "1cvl93h83ymbfhb567jv5gzyq08181w7c46rsw4xqqqpcvkvfwrx";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/development/mobile/androidenv/compose-android-packages.nix b/pkgs/development/mobile/androidenv/compose-android-packages.nix
index 6e6a349cccc..a7473662006 100644
--- a/pkgs/development/mobile/androidenv/compose-android-packages.nix
+++ b/pkgs/development/mobile/androidenv/compose-android-packages.nix
@@ -101,14 +101,14 @@ rec {
   platforms = map (version:
     deployAndroidPackage {
       inherit os;
-      package = packages.platforms."${version}";
+      package = packages.platforms.${version};
     }
   ) platformVersions;
 
   sources = map (version:
     deployAndroidPackage {
       inherit os;
-      package = packages.sources."${version}";
+      package = packages.sources.${version};
     }
   ) platformVersions;
 
@@ -151,14 +151,14 @@ rec {
   google-apis = map (version:
     deployAndroidPackage {
       inherit os;
-      package = addons.addons."${version}".google_apis;
+      package = addons.addons.${version}.google_apis;
     }
   ) (builtins.filter (platformVersion: platformVersion < "26") platformVersions); # API level 26 and higher include Google APIs by default
 
   google-tv-addons = map (version:
     deployAndroidPackage {
       inherit os;
-      package = addons.addons."${version}".google_tv_addon;
+      package = addons.addons.${version}.google_tv_addon;
     }
   ) platformVersions;
 
@@ -225,10 +225,10 @@ rec {
       # Link extras
       ${lib.concatMapStrings (identifier:
         let
-          path = addons.extras."${identifier}".path;
+          path = addons.extras.${identifier}.path;
           addon = deployAndroidPackage {
             inherit os;
-            package = addons.extras."${identifier}";
+            package = addons.extras.${identifier};
           };
         in
         ''
diff --git a/pkgs/development/mobile/androidenv/tools.nix b/pkgs/development/mobile/androidenv/tools.nix
index 9957168f7af..92f53e5a7c2 100644
--- a/pkgs/development/mobile/androidenv/tools.nix
+++ b/pkgs/development/mobile/androidenv/tools.nix
@@ -19,8 +19,8 @@ if toolsVersion == "26.0.1" then import ./tools/26.nix {
   };
 } else if toolsVersion == "26.1.1" then import ./tools/26.nix {
   inherit deployAndroidPackage lib autoPatchelfHook makeWrapper os pkgs pkgs_i686 postInstall;
-  package = packages.tools."${toolsVersion}";
+  package = packages.tools.${toolsVersion};
 } else import ./tools/25.nix {
   inherit deployAndroidPackage lib autoPatchelfHook makeWrapper os pkgs pkgs_i686 postInstall;
-  package = packages.tools."${toolsVersion}";
+  package = packages.tools.${toolsVersion};
 }
diff --git a/pkgs/development/node-packages/composition-v10.nix b/pkgs/development/node-packages/composition-v10.nix
index 9f723a6da47..9e2521717ef 100644
--- a/pkgs/development/node-packages/composition-v10.nix
+++ b/pkgs/development/node-packages/composition-v10.nix
@@ -2,7 +2,7 @@
 
 {pkgs ? import <nixpkgs> {
     inherit system;
-  }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-10_x"}:
+  }, system ? builtins.currentSystem, nodejs ? pkgs.nodejs-10_x}:
 
 let
   nodeEnv = import ./node-env.nix {
diff --git a/pkgs/development/node-packages/composition-v12.nix b/pkgs/development/node-packages/composition-v12.nix
index 4f05009f3ef..4ed0336ec5c 100644
--- a/pkgs/development/node-packages/composition-v12.nix
+++ b/pkgs/development/node-packages/composition-v12.nix
@@ -2,7 +2,7 @@
 
 {pkgs ? import <nixpkgs> {
     inherit system;
-  }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-6_x"}:
+  }, system ? builtins.currentSystem, nodejs ? pkgs.nodejs-6_x}:
 
 let
   nodeEnv = import ./node-env.nix {
diff --git a/pkgs/development/ocaml-modules/labltk/default.nix b/pkgs/development/ocaml-modules/labltk/default.nix
index b4a4e012560..d92cf543f80 100644
--- a/pkgs/development/ocaml-modules/labltk/default.nix
+++ b/pkgs/development/ocaml-modules/labltk/default.nix
@@ -25,7 +25,7 @@ let param = {
     key = "1764";
     sha256 = "0wgx65y1wkgf22ihpqmspqfp95fqbj3pldhp1p3b1mi8rmc37zwj";
   };
-}."${builtins.substring 0 4 ocaml.version}";
+}.${builtins.substring 0 4 ocaml.version};
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/ocaml-modules/lwt/legacy.nix b/pkgs/development/ocaml-modules/lwt/legacy.nix
index cd40a5051be..d93f87aac0d 100644
--- a/pkgs/development/ocaml-modules/lwt/legacy.nix
+++ b/pkgs/development/ocaml-modules/lwt/legacy.nix
@@ -14,7 +14,7 @@ let sha256 = {
   "3.0.0" = "0wwhnl9hppixcsdisinj1wmffx0nv6hkpm01z9qvkngkrazi3i88";
   "2.7.1" = "0w7f59havrl2fsnvs84lm7wlqpsrldg80gy5afpnpr21zkw22g8w";
   "2.6.0" = "0f1h83zh60rspm4fxd96z9h5bkhq1n1q968hgq92sq4a6bfi1c2w";
-}."${version}"; in
+}.${version}; in
 
 let optionals = stdenv.lib.optionals (!stdenv.lib.versionAtLeast version "3"); in
 
diff --git a/pkgs/development/python-modules/numpy/default.nix b/pkgs/development/python-modules/numpy/default.nix
index 10a1df8876c..c6e5c2c648f 100644
--- a/pkgs/development/python-modules/numpy/default.nix
+++ b/pkgs/development/python-modules/numpy/default.nix
@@ -5,7 +5,7 @@ let
   cfg = writeTextFile {
     name = "site.cfg";
     text = (lib.generators.toINI {} {
-      "${blasImplementation}" = {
+      ${blasImplementation} = {
         include_dirs = "${blas}/include";
         library_dirs = "${blas}/lib";
       } // lib.optionalAttrs (blasImplementation == "mkl") {
@@ -16,12 +16,12 @@ let
   };
 in buildPythonPackage rec {
   pname = "numpy";
-  version = "1.17.0";
+  version = "1.17.1";
 
   src = fetchPypi {
     inherit pname version;
     extension = "zip";
-    sha256 = "951fefe2fb73f84c620bec4e001e80a80ddaa1b84dce244ded7f1e0cbe0ed34a";
+    sha256 = "f11331530f0eff69a758d62c2461cd98cdc2eae0147279d8fc86e0464eb7e8ca";
   };
 
   nativeBuildInputs = [ gfortran pytest ];
diff --git a/pkgs/development/python-modules/spacy/models.nix b/pkgs/development/python-modules/spacy/models.nix
index d9a67454fe6..b091c3b7d56 100644
--- a/pkgs/development/python-modules/spacy/models.nix
+++ b/pkgs/development/python-modules/spacy/models.nix
@@ -13,7 +13,7 @@ let
     meta = with stdenv.lib; {
       description = "Models for the spaCy NLP library";
       homepage    = "https://github.com/explosion/spacy-models";
-      license     = licenses."${license}";
+      license     = licenses.${license};
       maintainers = with maintainers; [ rvl ];
     };
   };
diff --git a/pkgs/development/ruby-modules/bundled-common/default.nix b/pkgs/development/ruby-modules/bundled-common/default.nix
index c31dfb63b3c..0812ff590a5 100644
--- a/pkgs/development/ruby-modules/bundled-common/default.nix
+++ b/pkgs/development/ruby-modules/bundled-common/default.nix
@@ -52,7 +52,7 @@ let
     name
   else
     let
-      gem = gems."${pname}";
+      gem = gems.${pname};
       version = gem.version;
     in
       "${pname}-${version}";
@@ -70,7 +70,7 @@ let
 
   maybeCopyAll = pkgname: if pkgname == null then "" else
   let
-    mainGem = gems."${pkgname}" or (throw "bundlerEnv: gem ${pkgname} not found");
+    mainGem = gems.${pkgname} or (throw "bundlerEnv: gem ${pkgname} not found");
   in
     copyIfBundledByPath mainGem;
 
diff --git a/pkgs/development/ruby-modules/bundled-common/functions.nix b/pkgs/development/ruby-modules/bundled-common/functions.nix
index 6324f27e9fa..a093cc4dc95 100644
--- a/pkgs/development/ruby-modules/bundled-common/functions.nix
+++ b/pkgs/development/ruby-modules/bundled-common/functions.nix
@@ -42,21 +42,21 @@ in rec {
       converge expandDependencies directlyMatchingGems;
 
   platformMatches = {rubyEngine, version, ...}: attrs: (
-  !(attrs ? "platforms") ||
+  !(attrs ? platforms) ||
   builtins.length attrs.platforms == 0 ||
     builtins.any (platform:
       platform.engine == rubyEngine &&
-        (!(platform ? "version") || platform.version == version.majMin)
+        (!(platform ? version) || platform.version == version.majMin)
     ) attrs.platforms
   );
 
   groupMatches = groups: attrs:
-    groups == null || !(attrs ? "groups") ||
+    groups == null || !(attrs ? groups) ||
       (intersectLists (groups ++ [ "default" ]) attrs.groups) != [];
 
   applyGemConfigs = attrs:
-    (if gemConfig ? "${attrs.gemName}"
-    then attrs // gemConfig."${attrs.gemName}" attrs
+    (if gemConfig ? ${attrs.gemName}
+    then attrs // gemConfig.${attrs.gemName} attrs
     else attrs);
 
   genStubsScript = { lib, ruby, confFiles, bundler, groups, binPaths, ... }: ''
@@ -88,6 +88,6 @@ in rec {
     inherit (attrs.source) type;
     source = removeAttrs attrs.source ["type"];
     gemName = name;
-    gemPath = map (gemName: gems."${gemName}") (attrs.dependencies or []);
+    gemPath = map (gemName: gems.${gemName}) (attrs.dependencies or []);
   });
 }
diff --git a/pkgs/development/ruby-modules/bundler-env/default.nix b/pkgs/development/ruby-modules/bundler-env/default.nix
index b3f91b678c4..9e9ccb128cf 100644
--- a/pkgs/development/ruby-modules/bundler-env/default.nix
+++ b/pkgs/development/ruby-modules/bundler-env/default.nix
@@ -49,7 +49,7 @@ in
       postBuild = genStubsScript {
         inherit lib ruby bundler groups;
         confFiles = basicEnv.confFiles;
-        binPaths = [ basicEnv.gems."${pname}" ];
+        binPaths = [ basicEnv.gems.${pname} ];
       } + lib.optionalString (postBuild != null) postBuild;
 
       meta = { platforms = ruby.meta.platforms; } // meta;
diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix
index df8ccfc0e4a..a7da68da544 100644
--- a/pkgs/development/tools/build-managers/bazel/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/default.nix
@@ -46,11 +46,11 @@ let
       srcs.io_bazel_rules_sass
       srcs.platforms
       (if stdenv.hostPlatform.isDarwin
-       then srcs.${"java_tools_javac11_darwin-v2.0.zip"}
-       else srcs.${"java_tools_javac11_linux-v2.0.zip"})
-      srcs.${"coverage_output_generator-v1.0.zip"}
+       then srcs."java_tools_javac11_darwin-v2.0.zip"
+       else srcs."java_tools_javac11_linux-v2.0.zip")
+      srcs."coverage_output_generator-v1.0.zip"
       srcs.build_bazel_rules_nodejs
-      srcs.${"android_tools_pkg-0.7.tar.gz"}
+      srcs."android_tools_pkg-0.7.tar.gz"
       ]);
 
   distDir = runCommand "bazel-deps" {} ''
diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix
index b5ee5d75817..94304f052fd 100644
--- a/pkgs/development/tools/build-managers/meson/default.nix
+++ b/pkgs/development/tools/build-managers/meson/default.nix
@@ -3,11 +3,11 @@
 let
   # See https://mesonbuild.com/Reference-tables.html#cpu-families
   cpuFamilies = {
-    "aarch64" = "aarch64";
-    "armv6l"  = "arm";
-    "armv7l"  = "arm";
-    "i686"    = "x86";
-    "x86_64"  = "x86_64";
+    aarch64 = "aarch64";
+    armv6l  = "arm";
+    armv7l  = "arm";
+    i686    = "x86";
+    x86_64  = "x86_64";
   };
 in
 python3Packages.buildPythonApplication rec {
diff --git a/pkgs/development/tools/misc/help2man/default.nix b/pkgs/development/tools/misc/help2man/default.nix
index 264f2aec44d..c4cba5ffc69 100644
--- a/pkgs/development/tools/misc/help2man/default.nix
+++ b/pkgs/development/tools/misc/help2man/default.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, perlPackages, gettext }:
 
 stdenv.mkDerivation rec {
-  name = "help2man-1.47.10";
+  name = "help2man-1.47.11";
 
   src = fetchurl {
     url = "mirror://gnu/help2man/${name}.tar.xz";
-    sha256 = "1yywli520246aba12vpgj7bhr1r13swad3xm49a0cygqcgywnwgk";
+    sha256 = "123vsimgx8zq1h077sbyh3bd0hbmlc3wih2231wwh133z1bv51ar";
   };
 
   nativeBuildInputs = [ gettext perlPackages.LocaleGettext ];
diff --git a/pkgs/development/tools/misc/kibana/5.x.nix b/pkgs/development/tools/misc/kibana/5.x.nix
index 7d824fd81fb..992d12ae08e 100644
--- a/pkgs/development/tools/misc/kibana/5.x.nix
+++ b/pkgs/development/tools/misc/kibana/5.x.nix
@@ -4,16 +4,16 @@ with stdenv.lib;
 let
   inherit (builtins) elemAt;
   archOverrides = {
-    "i686" = "x86";
+    i686 = "x86";
   };
   info = splitString "-" stdenv.hostPlatform.system;
   arch = (elemAt info 0);
-  elasticArch = archOverrides."${arch}" or arch;
+  elasticArch = archOverrides.${arch} or arch;
   plat = elemAt info 1;
   shas = {
-    "x86_64-linux"  = "0hzr47hyw54b9j4c33n6f6n3pala6kjhyvinfszgikbghyhb7fsa";
-    "i686-linux"    = "0bka4h31cw10ii4pfygc81pwc3wr32pzw3v4k4bi8rnqbk280fmn";
-    "x86_64-darwin" = "0jqc2g89rqkla0alqxr14sh4pccfn514jrwr7mkjivxdapygh1ll";
+    x86_64-linux  = "0hzr47hyw54b9j4c33n6f6n3pala6kjhyvinfszgikbghyhb7fsa";
+    i686-linux    = "0bka4h31cw10ii4pfygc81pwc3wr32pzw3v4k4bi8rnqbk280fmn";
+    x86_64-darwin = "0jqc2g89rqkla0alqxr14sh4pccfn514jrwr7mkjivxdapygh1ll";
   };
 in stdenv.mkDerivation rec {
   pname = "kibana";
@@ -21,7 +21,7 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://artifacts.elastic.co/downloads/kibana/${pname}-${version}-${plat}-${elasticArch}.tar.gz";
-    sha256 = shas."${stdenv.hostPlatform.system}" or (throw "Unknown architecture");
+    sha256 = shas.${stdenv.hostPlatform.system} or (throw "Unknown architecture");
   };
 
   buildInputs = [ makeWrapper ];
diff --git a/pkgs/development/tools/misc/kibana/6.x.nix b/pkgs/development/tools/misc/kibana/6.x.nix
index 46a72a32722..635be9e0876 100644
--- a/pkgs/development/tools/misc/kibana/6.x.nix
+++ b/pkgs/development/tools/misc/kibana/6.x.nix
@@ -18,12 +18,12 @@ let
   shas =
     if enableUnfree
     then {
-      "x86_64-linux"  = "1i3zmzxihplwd8n994lfxhhgygdg3qxjqgrj1difa8w3vss0zbfn";
-      "x86_64-darwin" = "09a96ms9id77infxd9xxfs6r7j01mn0rz5yw3g9sl92j9ri7r52c";
+      x86_64-linux  = "1i3zmzxihplwd8n994lfxhhgygdg3qxjqgrj1difa8w3vss0zbfn";
+      x86_64-darwin = "09a96ms9id77infxd9xxfs6r7j01mn0rz5yw3g9sl92j9ri7r52c";
     }
     else {
-      "x86_64-linux"  = "166rhxr0qlv1yarj2mg1c3b8mxvhl70jhz53azq7ic6laj55q7fk";
-      "x86_64-darwin" = "0ngngkbl036p2mzwhp8qafi3aqzk398a218w12srfqny5n630vdk";
+      x86_64-linux  = "166rhxr0qlv1yarj2mg1c3b8mxvhl70jhz53azq7ic6laj55q7fk";
+      x86_64-darwin = "0ngngkbl036p2mzwhp8qafi3aqzk398a218w12srfqny5n630vdk";
     };
 
 in stdenv.mkDerivation rec {
@@ -32,7 +32,7 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${arch}.tar.gz";
-    sha256 = shas."${stdenv.hostPlatform.system}" or (throw "Unknown architecture");
+    sha256 = shas.${stdenv.hostPlatform.system} or (throw "Unknown architecture");
   };
 
   patches = [
diff --git a/pkgs/development/tools/misc/kibana/7.x.nix b/pkgs/development/tools/misc/kibana/7.x.nix
index 9fba3b43e11..2fc0242c014 100644
--- a/pkgs/development/tools/misc/kibana/7.x.nix
+++ b/pkgs/development/tools/misc/kibana/7.x.nix
@@ -18,12 +18,12 @@ let
   shas =
     if enableUnfree
     then {
-      "x86_64-linux"  = "1mzycd0ljnkslz9p9jhq279bkpk35r7svhngxjnmsh11ampsvxb8";
-      "x86_64-darwin" = "1bz409njdpmsagh5dg062114wpa96w7pmxwfjsizwksqyyjdwdv7";
+      x86_64-linux  = "1mzycd0ljnkslz9p9jhq279bkpk35r7svhngxjnmsh11ampsvxb8";
+      x86_64-darwin = "1bz409njdpmsagh5dg062114wpa96w7pmxwfjsizwksqyyjdwdv7";
     }
     else {
-      "x86_64-linux"  = "1x3gjc9xa03m4jfnl5vjxigzcnb8ysnhxgd8618v85x4l0010v38";
-      "x86_64-darwin" = "1nsbmrswv2jv2z7686i2sf6rrmxysbqi5ih6jjrbrqnk64xi18j2";
+      x86_64-linux  = "1x3gjc9xa03m4jfnl5vjxigzcnb8ysnhxgd8618v85x4l0010v38";
+      x86_64-darwin = "1nsbmrswv2jv2z7686i2sf6rrmxysbqi5ih6jjrbrqnk64xi18j2";
     };
 
 in stdenv.mkDerivation rec {
@@ -32,7 +32,7 @@ in stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${arch}.tar.gz";
-    sha256 = shas."${stdenv.hostPlatform.system}" or (throw "Unknown architecture");
+    sha256 = shas.${stdenv.hostPlatform.system} or (throw "Unknown architecture");
   };
 
   patches = [
diff --git a/pkgs/development/tools/ocaml/camlp4/default.nix b/pkgs/development/tools/ocaml/camlp4/default.nix
index 4a4203a2f59..a7ef6d7bedd 100644
--- a/pkgs/development/tools/ocaml/camlp4/default.nix
+++ b/pkgs/development/tools/ocaml/camlp4/default.nix
@@ -22,7 +22,7 @@ let param = {
   "4.08" = {
      version = "4.08+1";
      sha256 = "0qplawvxwai25bi27niw2cgz2al01kcnkj8wxwhxslpi21z6pyx1"; };
-  }."${ocaml.meta.branch}";
+  }.${ocaml.meta.branch};
 in
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
index e6fb1b353d2..e535ba29aeb 100644
--- a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
+++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
     sha256 = {
       "2.7" = "1dali1akyd4zmkwav0d957ynxq2jj6cc94r4xiaql7ca89ajz4jj";
       "2.8.4" = "098ph50s9kqw6rc3qjn39zv9b5swdf4qr44afwqfkkjgjs5d7vbl";
-    }."${version}";
+    }.${version};
   };
 
   buildInputs = [ ocaml findlib menhir ocsigen_deriving ocamlbuild
diff --git a/pkgs/development/tools/selenium/chromedriver/default.nix b/pkgs/development/tools/selenium/chromedriver/default.nix
index 5937b00f459..eff06daac06 100644
--- a/pkgs/development/tools/selenium/chromedriver/default.nix
+++ b/pkgs/development/tools/selenium/chromedriver/default.nix
@@ -4,18 +4,18 @@
 }:
 let
   allSpecs = {
-    "x86_64-linux" = {
+    x86_64-linux = {
       system = "linux64";
       sha256 = "04wb6h57daxmnv3a3xrcsznawbx7r8wyi1vk1g26z2l2ppcnsbzv";
     };
 
-    "x86_64-darwin" = {
+    x86_64-darwin = {
       system = "mac64";
       sha256 = "0f8j7m8ardaaw8pv02vxhwkqbcm34366bln0np0j0ig21d4fag09";
     };
   };
 
-  spec = allSpecs."${stdenv.hostPlatform.system}"
+  spec = allSpecs.${stdenv.hostPlatform.system}
     or (throw "missing chromedriver binary for ${stdenv.hostPlatform.system}");
 
   libs = stdenv.lib.makeLibraryPath [
diff --git a/pkgs/development/tools/tora/default.nix b/pkgs/development/tools/tora/default.nix
index 7f35d3c438d..3a7221e99eb 100644
--- a/pkgs/development/tools/tora/default.nix
+++ b/pkgs/development/tools/tora/default.nix
@@ -1,41 +1,37 @@
 { mkDerivation, lib, fetchFromGitHub, cmake, extra-cmake-modules, makeWrapper
-, boost, doxygen, openssl, mysql, postgresql, graphviz, loki, qscintilla, qtbase }:
+, boost, doxygen, openssl, mysql, postgresql, graphviz, loki
+, qscintilla, qtbase, qttools }:
 
-let
-  qscintillaLib = (qscintilla.override { withQt5 = true; });
-
-in mkDerivation rec {
+mkDerivation rec {
   pname = "tora";
-  version = "3.1";
+  version = "3.2.176";
 
   src = fetchFromGitHub {
     owner  = "tora-tool";
     repo   = "tora";
-    rev    = "v${version}";
-    sha256 = "0wninl10bcgiljf6wnhn2rv8kmzryw78x5qvbw8s2zfjlnxjsbn7";
+    rev    = "39bf2837779bf458fc72a9f0e49271152e57829f";
+    sha256 = "0fr9b542i8r6shgnz33lc3cz333fnxgmac033yxfrdjfglzk0j2k";
   };
 
-  nativeBuildInputs = [ cmake extra-cmake-modules makeWrapper ];
+  nativeBuildInputs = [ cmake extra-cmake-modules makeWrapper qttools ];
+
   buildInputs = [
-    boost doxygen graphviz loki mysql.connector-c openssl postgresql qscintillaLib qtbase
+    boost doxygen graphviz loki mysql.connector-c openssl postgresql qscintilla qtbase
   ];
 
   preConfigure = ''
-    sed -i \
-      's|defaultGvHome = "/usr/bin"|defaultGvHome = "${lib.getBin graphviz}/bin"|' \
-      src/widgets/toglobalsetting.cpp
-
-    sed -i \
-      's|/usr/bin/dot|${lib.getBin graphviz}/bin/dot|' \
-      extlibs/libermodel/dotgraph.cpp
+    substituteInPlace src/widgets/toglobalsetting.cpp \
+      --replace 'defaultGvHome = "/usr/bin"' 'defaultGvHome = "${lib.getBin graphviz}/bin"'
+    substituteInPlace extlibs/libermodel/dotgraph.cpp \
+      --replace /usr/bin/dot ${lib.getBin graphviz}/bin/dot
   '';
 
   cmakeFlags = [
     "-DWANT_INTERNAL_LOKI=0"
     "-DWANT_INTERNAL_QSCINTILLA=0"
     # cmake/modules/FindQScintilla.cmake looks in qtbase and for the wrong library name
-    "-DQSCINTILLA_INCLUDE_DIR=${qscintillaLib}/include"
-    "-DQSCINTILLA_LIBRARY=${qscintillaLib}/lib/libqscintilla2.so"
+    "-DQSCINTILLA_INCLUDE_DIR=${qscintilla}/include"
+    "-DQSCINTILLA_LIBRARY=${qscintilla}/lib/libqscintilla2.so"
     "-DENABLE_DB2=0"
     "-DENABLE_ORACLE=0"
     "-DENABLE_TERADATA=0"
diff --git a/pkgs/development/web/remarkjs/nodepkgs.nix b/pkgs/development/web/remarkjs/nodepkgs.nix
index 10fbc98d51a..bbdaeb5d292 100644
--- a/pkgs/development/web/remarkjs/nodepkgs.nix
+++ b/pkgs/development/web/remarkjs/nodepkgs.nix
@@ -2,7 +2,7 @@
 
 {pkgs ? import <nixpkgs> {
     inherit system;
-  }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-10_x"}:
+  }, system ? builtins.currentSystem, nodejs ? pkgs.nodejs-10_x}:
 
 let
   nodeEnv = import ../../node-packages/node-env.nix {