summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-12-13 16:14:47 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-12-13 16:14:47 -0500
commita0b1ebeee965c03e670af7bb6807e213997ebbb4 (patch)
tree449dfbb80891d79eea9ce021a1408fce9d73fc48 /pkgs/development/compilers
parent84fb59e0be30504e16ed428c34f1b321f6187fbe (diff)
parent105d9519c128a8954e5dd1616f71311ddde20cbc (diff)
downloadnixlib-a0b1ebeee965c03e670af7bb6807e213997ebbb4.tar
nixlib-a0b1ebeee965c03e670af7bb6807e213997ebbb4.tar.gz
nixlib-a0b1ebeee965c03e670af7bb6807e213997ebbb4.tar.bz2
nixlib-a0b1ebeee965c03e670af7bb6807e213997ebbb4.tar.lz
nixlib-a0b1ebeee965c03e670af7bb6807e213997ebbb4.tar.xz
nixlib-a0b1ebeee965c03e670af7bb6807e213997ebbb4.tar.zst
nixlib-a0b1ebeee965c03e670af7bb6807e213997ebbb4.zip
Merge remote-tracking branch 'upstream/staging' into binutils-wrapper
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/arachne-pnr/default.nix6
-rw-r--r--pkgs/development/compilers/ats2/default.nix8
-rw-r--r--pkgs/development/compilers/ats2/install-postiats-contrib.patch19
-rw-r--r--pkgs/development/compilers/ccl/default.nix21
-rw-r--r--pkgs/development/compilers/chez/default.nix18
-rw-r--r--pkgs/development/compilers/dmd/2.067.1.nix167
-rw-r--r--pkgs/development/compilers/dmd/default.nix424
-rw-r--r--pkgs/development/compilers/elm/default.nix4
-rw-r--r--pkgs/development/compilers/elm/packages/elm-interface-to-json.nix24
-rw-r--r--pkgs/development/compilers/fpc/lazarus.nix6
-rw-r--r--pkgs/development/compilers/gambit/default.nix6
-rw-r--r--pkgs/development/compilers/gerbil/default.nix10
-rw-r--r--pkgs/development/compilers/ghc/head.nix6
-rw-r--r--pkgs/development/compilers/go/1.8.nix6
-rw-r--r--pkgs/development/compilers/go/1.9.nix6
-rw-r--r--pkgs/development/compilers/hhvm/default.nix12
-rw-r--r--pkgs/development/compilers/jetbrains-jdk/default.nix4
-rw-r--r--pkgs/development/compilers/julia/0.5.nix1
-rw-r--r--pkgs/development/compilers/julia/0.6.nix1
-rw-r--r--pkgs/development/compilers/ldc/default.nix334
-rw-r--r--pkgs/development/compilers/mono/4.4.nix1
-rw-r--r--pkgs/development/compilers/mono/4.6.nix1
-rw-r--r--pkgs/development/compilers/mono/4.8.nix1
-rw-r--r--pkgs/development/compilers/mono/5.0.nix1
-rw-r--r--pkgs/development/compilers/mono/generic-cmake.nix7
-rw-r--r--pkgs/development/compilers/mono/generic.nix14
-rw-r--r--pkgs/development/compilers/nasm/default.nix4
-rw-r--r--pkgs/development/compilers/neko/default.nix2
-rw-r--r--pkgs/development/compilers/ocaml/ber-metaocaml-104.nix (renamed from pkgs/development/compilers/ocaml/ber-metaocaml-003.nix)54
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk-linux-base.nix18
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix3
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix3
-rw-r--r--pkgs/development/compilers/orc/default.nix3
-rw-r--r--pkgs/development/compilers/owl-lisp/default.nix2
-rw-r--r--pkgs/development/compilers/purescript/psc-package/default.nix4
-rw-r--r--pkgs/development/compilers/reason/default.nix6
-rw-r--r--pkgs/development/compilers/rust/bootstrap.nix3
-rw-r--r--pkgs/development/compilers/rust/default.nix4
-rw-r--r--pkgs/development/compilers/rust/patches/aarch64-disable-test_loading_cosine.patch12
-rwxr-xr-xpkgs/development/compilers/rust/print-hashes.sh1
-rw-r--r--pkgs/development/compilers/rust/rustc.nix3
-rw-r--r--pkgs/development/compilers/sbcl/default.nix15
-rw-r--r--pkgs/development/compilers/yosys/default.nix22
43 files changed, 712 insertions, 555 deletions
diff --git a/pkgs/development/compilers/arachne-pnr/default.nix b/pkgs/development/compilers/arachne-pnr/default.nix
index 7db75d129781..1e7791c84c44 100644
--- a/pkgs/development/compilers/arachne-pnr/default.nix
+++ b/pkgs/development/compilers/arachne-pnr/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "arachne-pnr-${version}";
-  version = "2017.11.05";
+  version = "2017.12.06";
 
   src = fetchFromGitHub {
     owner  = "cseed";
     repo   = "arachne-pnr";
-    rev    = "1e81432830c75c505c76e419619f605a6c4c7583";
-    sha256 = "0lzblmi1klbsmd32h8nh027npm1z1a199lng13lcrqwr17lhb7my";
+    rev    = "a32dd2c137b2bb6ba6704b25109790ac76bc2f45";
+    sha256 = "16pfm8spcm3nsrdsjdj22v7dddnwzlhbj1y71wflvvb84xnbga2y";
   };
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/compilers/ats2/default.nix b/pkgs/development/compilers/ats2/default.nix
index 3abd5c8c82a9..6c523ebb4f14 100644
--- a/pkgs/development/compilers/ats2/default.nix
+++ b/pkgs/development/compilers/ats2/default.nix
@@ -3,11 +3,11 @@
 , withContrib ? true }:
 
 let
-  versionPkg = "0.3.0" ;
+  versionPkg = "0.3.7" ;
 
   contrib = fetchurl {
     url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-contrib-${versionPkg}.tgz" ;
-    sha256 = "1s4yscisn9gsr692jmh4y5mz03012pv84cm7l5n51v83wc08fks0" ;
+    sha256 = "1w59ir9ij5bvvnxj6fb1rvzycfqa57i31wmpwawxbsb10bqwzyr6";
   };
 
   postInstallContrib = stdenv.lib.optionalString withContrib
@@ -31,11 +31,9 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-${version}.tgz";
-    sha256 = "1knf03r8a5sis7n8rw54flf1lxfbr3prywxb1czcdp6hsbcd1v1d";
+    sha256 = "19nxyi39fn42sp38kl14a6pvbxq9wr8y405wx0zz7mqb77r0m0h5";
   };
 
-  patches = [ ./install-postiats-contrib.patch ];
-
   buildInputs = [ gmp ];
 
   setupHook = with stdenv.lib;
diff --git a/pkgs/development/compilers/ats2/install-postiats-contrib.patch b/pkgs/development/compilers/ats2/install-postiats-contrib.patch
deleted file mode 100644
index cb280d028b52..000000000000
--- a/pkgs/development/compilers/ats2/install-postiats-contrib.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Install the parts of the contrib that have been moved to Postiats.
-diff -Naur ATS2-Postiats-0.3.0-upstream/Makefile_dist ATS2-Postiats-0.3.0/Makefile_dist
---- ATS2-Postiats-0.3.0-upstream/Makefile_dist	2017-01-20 10:23:54.000000000 -0400
-+++ ATS2-Postiats-0.3.0/Makefile_dist	2017-01-21 13:14:27.614723335 -0400
-@@ -124,12 +124,12 @@
-   cd "$(abs_top_srcdir)" && \
-   $(MKDIR_P) $(PATSLIBHOME2)/bin && \
-   if [ ! -d $(bindir2) ] ; then $(MKDIR_P) $(bindir2) ; fi && \
--  for x in share ccomp prelude libc libats ; do \
-+  for x in share ccomp prelude libc libats contrib atscntrb ; do \
-     find "$$x" -type d -exec $(MKDIR_P) $(PATSLIBHOME2)/\{} \; -print; \
-   done
- 
- install_files_0: install_dirs ; \
--  for x in share ccomp/runtime prelude libc libats ; do \
-+  for x in share ccomp/runtime prelude libc libats contrib atscntrb ; do \
-     cd "$(abs_top_srcdir)" && \
-     $(INSTALL) -d $(PATSLIBHOME2)/"$$x" && \
-     find "$$x" -type l -exec cp -d \{} $(PATSLIBHOME2)/\{} \; -print && \
diff --git a/pkgs/development/compilers/ccl/default.nix b/pkgs/development/compilers/ccl/default.nix
index ed7e0357d74c..696728e6f32c 100644
--- a/pkgs/development/compilers/ccl/default.nix
+++ b/pkgs/development/compilers/ccl/default.nix
@@ -1,11 +1,11 @@
-{ stdenv, fetchsvn, fetchpatch, gcc, glibc, m4, coreutils }:
+{ stdenv, fetchurl, gcc, glibc, m4, coreutils }:
 
 let
   options = rec {
     /* TODO: there are also MacOS, FreeBSD and Windows versions */
     x86_64-linux = {
       arch = "linuxx86";
-      sha256 = "0g6mkl207ri3ib9w85i9w0sv7srz784pbxidz0d95p6qkvg6shba";
+      sha256 = "0hs1f3z7crgzvinpj990kv9gvbsipxvcvwbmk54n51nasvc5025q";
       runtime = "lx86cl64";
       kernel = "linuxx8664";
     };
@@ -17,7 +17,7 @@ let
     };
     armv7l-linux = {
       arch = "linuxarm";
-      sha256 = "0k6wxwyg3pmbb5xdkwma0i3rvbjmy3p604g4minjjc1drzsn1i0q";
+      sha256 = "0p0l1dzsygb6i1xxgbipjpxkn46xhq3jm41a34ga1qqp4x8lkr62";
       runtime = "armcl";
       kernel = "linuxarm";
     };
@@ -30,21 +30,13 @@ assert builtins.hasAttr stdenv.system options;
 
 stdenv.mkDerivation rec {
   name     = "ccl-${version}";
-  version  = "1.11";
-  revision = "16313";
+  version  = "1.11.5";
 
-  src = fetchsvn {
-    url = "http://svn.clozure.com/publicsvn/openmcl/release/${version}/${cfg.arch}/ccl";
-    rev = revision;
+  src = fetchurl {
+    url = "https://github.com/Clozure/ccl/releases/download/v${version}/ccl-${version}-${cfg.arch}.tar.gz";
     sha256 = cfg.sha256;
   };
 
-  patches = fetchpatch {
-    name = "ccl-1.11-glibc-2.26.patch";
-    url = https://patch-diff.githubusercontent.com/raw/Clozure/ccl/pull/80.patch;
-    sha256 = "02v6287w0nppfpvkn9dyd5rvq2zkgd47ia9gs17hrww2hgzr6agd";
-  };
-
   buildInputs = [ gcc glibc m4 ];
 
   CCL_RUNTIME = cfg.runtime;
@@ -52,7 +44,6 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
-      --replace "svnversion" "echo ${revision}" \
       --replace "/bin/rm"    "${coreutils}/bin/rm" \
       --replace "/bin/echo"  "${coreutils}/bin/echo"
 
diff --git a/pkgs/development/compilers/chez/default.nix b/pkgs/development/compilers/chez/default.nix
index cd9a8e514e93..f238e5f8fb50 100644
--- a/pkgs/development/compilers/chez/default.nix
+++ b/pkgs/development/compilers/chez/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, coreutils, ncurses, libX11 }:
+{ stdenv, fetchgit, coreutils, cctools, ncurses, libiconv, libX11 }:
 
 stdenv.mkDerivation rec {
   name    = "chez-scheme-${version}";
@@ -12,8 +12,9 @@ stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
-  enableParallelBuilding = true;
-  buildInputs = [ ncurses libX11 ];
+  nativeBuildInputs = [ coreutils ] ++ stdenv.lib.optional stdenv.isDarwin cctools;
+
+  buildInputs = [ ncurses libiconv libX11 ];
 
   /* We patch out a very annoying 'feature' in ./configure, which
   ** tries to use 'git' to update submodules.
@@ -27,11 +28,14 @@ stdenv.mkDerivation rec {
       --replace "git submodule init && git submodule update || exit 1" "true"
 
     substituteInPlace ./workarea \
-      --replace "/bin/ln" "${coreutils}/bin/ln" \
-      --replace "/bin/cp" "${coreutils}/bin/cp"
+      --replace "/bin/ln" ln \
+      --replace "/bin/cp" cp
 
     substituteInPlace ./makefiles/installsh \
       --replace "/usr/bin/true" "${coreutils}/bin/true"
+
+    substituteInPlace zlib/configure \
+      --replace "/usr/bin/libtool" libtool
   '';
 
   /* Don't use configureFlags, since that just implicitly appends
@@ -42,11 +46,13 @@ stdenv.mkDerivation rec {
     ./configure --threads --installprefix=$out --installman=$out/share/man
   '';
 
+  enableParallelBuilding = true;
+
   meta = {
     description = "A powerful and incredibly fast R6RS Scheme compiler";
     homepage    = "http://www.scheme.com";
     license     = stdenv.lib.licenses.asl20;
-    platforms   = stdenv.lib.platforms.linux;
+    platforms   = stdenv.lib.platforms.unix;
     maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
   };
 }
diff --git a/pkgs/development/compilers/dmd/2.067.1.nix b/pkgs/development/compilers/dmd/2.067.1.nix
deleted file mode 100644
index 29a8618dc7b9..000000000000
--- a/pkgs/development/compilers/dmd/2.067.1.nix
+++ /dev/null
@@ -1,167 +0,0 @@
-{ stdenv, fetchFromGitHub
-, makeWrapper, unzip, which
-, curl, tzdata
-}:
-
-stdenv.mkDerivation rec {
-  name = "dmd-${version}";
-  # This is the last version of dmd which is buildable without a D compiler.
-  # So we use this as a bootstrap version.
-  # The DMD frontend has been ported to D in 2.069.0 but idgen was already
-  # ported in 2.068.0.
-  version = "2.067.1";
-
-  srcs = [
-  (fetchFromGitHub {
-    owner = "dlang";
-    repo = "dmd";
-    rev = "v${version}";
-    sha256 = "0fm29lg8axfmzdaj0y6vg70lhwb5d9rv4aavnvdd15xjschinlcz";
-    name = "dmd-v${version}-src";
-  })
-  (fetchFromGitHub {
-    owner = "dlang";
-    repo = "druntime";
-    rev = "v${version}";
-    sha256 = "1n2qfw9kmnql0fk2nxikispqs7vh85nhvyyr00fk227n9lgnqf02";
-    name = "druntime-v${version}-src";
-  })
-  (fetchFromGitHub {
-    owner = "dlang";
-    repo = "phobos";
-    rev = "v${version}";
-    sha256 = "0fywgds9xvjcgnqxmpwr67p3wi2m535619pvj159cgwv5y0nr3p1";
-    name = "phobos-v${version}-src";
-  })
-  ];
-
-  sourceRoot = ".";
-
-  postUnpack = ''
-      mv dmd-v${version}-src dmd
-      mv druntime-v${version}-src druntime
-      mv phobos-v${version}-src phobos
-  '';
-
-  # Compile with PIC to prevent colliding modules with binutils 2.28.
-  # https://issues.dlang.org/show_bug.cgi?id=17375
-  usePIC = "-fPIC";
-  ROOT_HOME_DIR = "$(echo ~root)";
-
-  postPatch = ''
-      # Ugly hack so the dlopen call has a chance to succeed.
-      # https://issues.dlang.org/show_bug.cgi?id=15391
-      substituteInPlace phobos/std/net/curl.d \
-          --replace libcurl.so ${curl.out}/lib/libcurl.so
-
-      # Ugly hack to fix the hardcoded path to zoneinfo in the source file.
-      # https://issues.dlang.org/show_bug.cgi?id=15391
-      substituteInPlace phobos/std/datetime.d \
-          --replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
-
-      substituteInPlace druntime/test/shared/Makefile \
-          --replace "DFLAGS:=" "DFLAGS:=${usePIC} "
-
-      # phobos uses curl, so we need to patch the path to the lib.
-      substituteInPlace phobos/posix.mak \
-          --replace "-soname=libcurl.so.4" "-soname=${curl.out}/lib/libcurl.so.4"
-
-      # Use proper C++ compiler
-      substituteInPlace dmd/src/posix.mak \
-          --replace g++ $CXX
-  ''
-
-  + stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
-      substituteInPlace dmd/src/root/port.c \
-        --replace "#include <bits/mathdef.h>" "#include <complex.h>"
-
-      # See https://github.com/NixOS/nixpkgs/issues/29443
-      substituteInPlace phobos/std/path.d \
-          --replace "\"/root" "\"${ROOT_HOME_DIR}"
-  ''
-
-  + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
-      substituteInPlace dmd/src/posix.mak \
-          --replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
-
-      # Was not able to compile on darwin due to "__inline_isnanl"
-      # being undefined.
-      substituteInPlace dmd/src/root/port.c --replace __inline_isnanl __inline_isnan
-  '';
-
-  nativeBuildInputs = [ makeWrapper unzip which ];
-  buildInputs = [ curl tzdata ];
-
-  # Buid and install are based on http://wiki.dlang.org/Building_DMD
-  buildPhase = ''
-      cd dmd
-      make -f posix.mak INSTALL_DIR=$out
-      export DMD=$PWD/src/dmd
-      cd ../druntime
-      make -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD
-      cd ../phobos
-      make -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD
-      cd ..
-  '';
-
-  # disable check phase because some tests are not working with sandboxing
-  doCheck = false;
-
-  checkPhase = ''
-      cd dmd
-      export DMD=$PWD/src/dmd
-      cd ../druntime
-      make -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release
-      cd ../phobos
-      make -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release
-      cd ..
-  '';
-
-  installPhase = ''
-      cd dmd
-      mkdir $out
-      mkdir $out/bin
-      cp $PWD/src/dmd $out/bin
-      mkdir -p $out/share/man/man1
-      mkdir -p $out/share/man/man5
-      cp -r docs/man/man1/* $out/share/man/man1/
-      cp -r docs/man/man5/* $out/share/man/man5/
-
-      cd ../druntime
-      mkdir $out/include
-      mkdir $out/include/d2
-      cp -r import/* $out/include/d2
-
-      cd ../phobos
-      mkdir $out/lib
-      ${
-          let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
-          osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name;
-          extension = if stdenv.hostPlatform.isDarwin then "a" else "{a,so}"; in
-          "cp generated/${osname}/release/${bits}/libphobos2.${extension} $out/lib"
-      }
-
-      cp -r std $out/include/d2
-      cp -r etc $out/include/d2
-
-      wrapProgram $out/bin/dmd \
-          --prefix PATH ":" "${stdenv.cc}/bin" \
-          --set-default CC "$CC"
-
-      cd $out/bin
-      tee dmd.conf << EOF
-      [Environment]
-      DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--export-dynamic"} -fPIC
-      EOF
-  '';
-
-  meta = with stdenv.lib; {
-    description = "Official reference compiler for the D language";
-    homepage = http://dlang.org/;
-    # Everything is now Boost licensed, even the backend.
-    # https://github.com/dlang/dmd/pull/6680
-    license = licenses.boost;
-    platforms = platforms.unix;
-  };
-}
-
diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix
index ff19a5b872cc..875e60dd6dc5 100644
--- a/pkgs/development/compilers/dmd/default.nix
+++ b/pkgs/development/compilers/dmd/default.nix
@@ -1,173 +1,289 @@
-{ stdenv, fetchFromGitHub
+{ stdenv, fetchFromGitHub, overrideCC, gcc5
 , makeWrapper, unzip, which
 , curl, tzdata, gdb, darwin
-# Versions 2.070.2 and up require a working dmd compiler to build:
-, bootstrapDmd }:
+, callPackage
+, bootstrapVersion ? false
+, version ? "2.075.1"
+, dmdSha256 ? "0kq6r8rcghvzk5jcphg89l85rg734s29bssd2rcw3fygx0k9a9k5"
+, druntimeSha256 ? "0idn2v1lmp7hl637g3i7pdfj9mjk4sclkz4cm77nl8873k2fhk8j"
+, phobosSha256 ? "1a7q5fd15yspgs5plxgx54jyrcwgzlyw3rahmz04jd2s5h56dj04"
+}:
 
-stdenv.mkDerivation rec {
-  name = "dmd-${version}";
-  version = "2.075.1";
-
-  srcs = [
-  (fetchFromGitHub {
-    owner = "dlang";
-    repo = "dmd";
-    rev = "v${version}";
-    sha256 = "0kq6r8rcghvzk5jcphg89l85rg734s29bssd2rcw3fygx0k9a9k5";
-    name = "dmd-v${version}-src";
-  })
-  (fetchFromGitHub {
-    owner = "dlang";
-    repo = "druntime";
-    rev = "v${version}";
-    sha256 = "0idn2v1lmp7hl637g3i7pdfj9mjk4sclkz4cm77nl8873k2fhk8j";
-    name = "druntime-v${version}-src";
-  })
-  (fetchFromGitHub {
-    owner = "dlang";
-    repo = "phobos";
-    rev = "v${version}";
-    sha256 = "1a7q5fd15yspgs5plxgx54jyrcwgzlyw3rahmz04jd2s5h56dj04";
-    name = "phobos-v${version}-src";
-  })
-  ];
-
-  sourceRoot = ".";
-
-  postUnpack = ''
-      mv dmd-v${version}-src dmd
-      mv druntime-v${version}-src druntime
-      mv phobos-v${version}-src phobos
-
-      # Remove cppa test for now because it doesn't work.
-      rm dmd/test/runnable/cppa.d
-      rm dmd/test/runnable/extra-files/cppb.cpp
-  '';
+let
+
+  bootstrapDmd = if !bootstrapVersion then
+    # Versions 2.070.2 and up require a working dmd compiler to build so we just
+    # use the last dmd without any D code to bootstrap the actual build.
+    callPackage ./default.nix {
+      stdenv = if stdenv.hostPlatform.isDarwin then
+                 stdenv
+               else
+                 # Doesn't build with gcc6 on linux
+                 overrideCC stdenv gcc5;
+      bootstrapVersion = true;
+      version = "2.067.1";
+      dmdSha256 = "0fm29lg8axfmzdaj0y6vg70lhwb5d9rv4aavnvdd15xjschinlcz";
+      druntimeSha256 = "1n2qfw9kmnql0fk2nxikispqs7vh85nhvyyr00fk227n9lgnqf02";
+      phobosSha256 = "0fywgds9xvjcgnqxmpwr67p3wi2m535619pvj159cgwv5y0nr3p1";
+    }
+  else
+    "";
+
+  dmdBuild = stdenv.mkDerivation rec {
+    name = "dmdBuild-${version}";
+    inherit version;
+
+    enableParallelBuilding = true;
+
+    srcs = [
+    (fetchFromGitHub {
+      owner = "dlang";
+      repo = "dmd";
+      rev = "v${version}";
+      sha256 = dmdSha256;
+      name = "dmd";
+    })
+    (fetchFromGitHub {
+      owner = "dlang";
+      repo = "druntime";
+      rev = "v${version}";
+      sha256 = druntimeSha256;
+      name = "druntime";
+    })
+    (fetchFromGitHub {
+      owner = "dlang";
+      repo = "phobos";
+      rev = "v${version}";
+      sha256 = phobosSha256;
+      name = "phobos";
+    })
+    ];
+
+    sourceRoot = ".";
 
-  # Compile with PIC to prevent colliding modules with binutils 2.28.
-  # https://issues.dlang.org/show_bug.cgi?id=17375
-  usePIC = "-fPIC";
+    postUnpack = ''
+        patchShebangs .
 
-  postPatch = ''
-      # Ugly hack so the dlopen call has a chance to succeed.
-      # https://issues.dlang.org/show_bug.cgi?id=15391
-      substituteInPlace phobos/std/net/curl.d \
-          --replace libcurl.so ${curl.out}/lib/libcurl.so
+        # Remove cppa test for now because it doesn't work.
+        rm dmd/test/runnable/cppa.d
+        rm dmd/test/runnable/extra-files/cppb.cpp
+    '';
+
+    # Compile with PIC to prevent colliding modules with binutils 2.28.
+    # https://issues.dlang.org/show_bug.cgi?id=17375
+    usePIC = "-fPIC";
+    ROOT_HOME_DIR = "$(echo ~root)";
+
+    datetimePath = if bootstrapVersion then
+      "phobos/std/datetime.d"
+    else
+      "phobos/std/datetime/timezone.d";
+
+    phobosPatches = ''
+        substituteInPlace ${datetimePath} \
+            --replace "import core.time;" "import core.time;import std.path;"
 
-      # Ugly hack to fix the hardcoded path to zoneinfo in the source file.
-      # https://issues.dlang.org/show_bug.cgi?id=15391
-      substituteInPlace phobos/std/datetime/timezone.d \
-          --replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
+        substituteInPlace ${datetimePath} \
+            --replace "tzName == \"leapseconds\"" "baseName(tzName) == \"leapseconds\""
 
-      substituteInPlace druntime/test/common.mak \
-          --replace "DFLAGS:=" "DFLAGS:=${usePIC} "
+        # Ugly hack to fix the hardcoded path to zoneinfo in the source file.
+        # https://issues.dlang.org/show_bug.cgi?id=15391
+        substituteInPlace ${datetimePath} \
+            --replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
 
-      # phobos uses curl, so we need to patch the path to the lib.
-      substituteInPlace phobos/posix.mak \
-          --replace "-soname=libcurl.so.4" "-soname=${curl.out}/lib/libcurl.so.4"
+        # Ugly hack so the dlopen call has a chance to succeed.
+        # https://issues.dlang.org/show_bug.cgi?id=15391
+        substituteInPlace phobos/std/net/curl.d \
+            --replace libcurl.so ${curl.out}/lib/libcurl.so
 
-      # Use proper C++ compiler
-      substituteInPlace dmd/posix.mak \
-          --replace g++ $CXX
-  ''
+        # phobos uses curl, so we need to patch the path to the lib.
+        substituteInPlace phobos/posix.mak \
+            --replace "-soname=libcurl.so.4" "-soname=${curl.out}/lib/libcurl.so.4"
+
+    ''
+
+    + stdenv.lib.optionalString (bootstrapVersion) ''
+        substituteInPlace ${datetimePath} \
+            --replace "import std.traits;" "import std.traits;import std.path;"
+
+        substituteInPlace ${datetimePath} \
+            --replace "tzName == \"+VERSION\"" "baseName(tzName) == \"leapseconds\" || tzName == \"+VERSION\""
+    ''
+
+    + stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
+        # See https://github.com/NixOS/nixpkgs/issues/29443
+        substituteInPlace phobos/std/path.d \
+            --replace "\"/root" "\"${ROOT_HOME_DIR}"
+    '';
+
+    dmdPath = if bootstrapVersion then
+      "dmd/src"
+    else
+      "dmd";
+
+    postPatch = ''
+        # Use proper C++ compiler
+        substituteInPlace ${dmdPath}/posix.mak \
+            --replace g++ $CXX
+
+        # TODO
+        substituteInPlace druntime/src/core/memory.d \
+            --replace "assert(z is null);" "//assert(z is null);"
+    ''
+
+    + stdenv.lib.optionalString (!bootstrapVersion) ''
+        substituteInPlace druntime/test/common.mak \
+            --replace "DFLAGS:=" "DFLAGS:=${usePIC} "
+    ''
+
+    + phobosPatches
+
+    + stdenv.lib.optionalString (stdenv.hostPlatform.isLinux && bootstrapVersion) ''
+      substituteInPlace ${dmdPath}/root/port.c \
+        --replace "#include <bits/mathdef.h>" "#include <complex.h>"
+    ''
 
     + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
-        substituteInPlace dmd/posix.mak \
+        substituteInPlace ${dmdPath}/posix.mak \
             --replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
+    ''
+
+    + stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin && bootstrapVersion) ''
+	# Was not able to compile on darwin due to "__inline_isnanl"
+	# being undefined.
+	substituteInPlace ${dmdPath}/root/port.c --replace __inline_isnanl __inline_isnan
     '';
 
-  nativeBuildInputs = [ bootstrapDmd makeWrapper unzip which gdb ]
-
-  ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
-    Foundation
-  ]);
-
-  buildInputs = [ curl tzdata ];
-
-  # Buid and install are based on http://wiki.dlang.org/Building_DMD
-  buildPhase = ''
-      cd dmd
-      make -j$NIX_BUILD_CORES -f posix.mak INSTALL_DIR=$out
-      ${
-          let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
-          osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in
-          "export DMD=$PWD/generated/${osname}/release/${bits}/dmd"
-      }
-      cd ../druntime
-      make -j$NIX_BUILD_CORES -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD
-      cd ../phobos
-      make -j$NIX_BUILD_CORES -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD
-      cd ..
-  '';
+    nativeBuildInputs = [ bootstrapDmd makeWrapper unzip which gdb ]
 
-  # disable check phase because some tests are not working with sandboxing
-  doCheck = false;
-
-  checkPhase = ''
-      cd dmd
-      ${
-          let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
-          osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in
-          "export DMD=$PWD/generated/${osname}/release/${bits}/dmd"
-      }
-      make -j$NIX_BUILD_CORES -C test -f Makefile PIC=${usePIC} DMD=$DMD BUILD=release SHARED=0
-      cd ../druntime
-      make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release
-      cd ../phobos
-      make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release
-      cd ..
-  '';
+    ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
+      Foundation
+    ]);
 
-  installPhase = ''
-      cd dmd
-      mkdir $out
-      mkdir $out/bin
-      ${
-          let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
-          osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in
-          "cp $PWD/generated/${osname}/release/${bits}/dmd $out/bin"
-      }
-
-      mkdir -p $out/share/man/man1
-      mkdir -p $out/share/man/man5
-      cp -r docs/man/man1/* $out/share/man/man1/
-      cp -r docs/man/man5/* $out/share/man/man5/
-
-      cd ../druntime
-      mkdir $out/include
-      mkdir $out/include/d2
-      cp -r import/* $out/include/d2
-
-      cd ../phobos
-      mkdir $out/lib
-      ${
-          let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
-          osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name;
-          extension = if stdenv.hostPlatform.isDarwin then "a" else "{a,so}"; in
-          "cp generated/${osname}/release/${bits}/libphobos2.${extension} $out/lib"
-      }
-
-      cp -r std $out/include/d2
-      cp -r etc $out/include/d2
-
-      wrapProgram $out/bin/dmd \
-          --prefix PATH ":" "${stdenv.cc}/bin" \
-          --set-default CC "$CC"
-
-      cd $out/bin
-      tee dmd.conf << EOF
-      [Environment]
-      DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--export-dynamic"} -fPIC
-      EOF
-  '';
+    buildInputs = [ curl tzdata ];
+
+    bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
+    osname = if stdenv.hostPlatform.isDarwin then
+      "osx"
+    else
+      stdenv.hostPlatform.parsed.kernel.name;
+    top = "$(echo $NIX_BUILD_TOP)";
+    pathToDmd = if bootstrapVersion then
+      "${top}/dmd/src/dmd"
+    else
+      "${top}/dmd/generated/${osname}/release/${bits}/dmd";
+
+    # Buid and install are based on http://wiki.dlang.org/Building_DMD
+    buildPhase = ''
+        cd dmd
+        make -j$NIX_BUILD_CORES -f posix.mak INSTALL_DIR=$out
+        cd ../druntime
+        make -j$NIX_BUILD_CORES -f posix.mak PIC=1 INSTALL_DIR=$out DMD=${pathToDmd}
+        cd ../phobos
+        make -j$NIX_BUILD_CORES -f posix.mak PIC=1 INSTALL_DIR=$out DMD=${pathToDmd}
+        cd ..
+    '';
 
-  meta = with stdenv.lib; {
-    description = "Official reference compiler for the D language";
-    homepage = http://dlang.org/;
-    # Everything is now Boost licensed, even the backend.
-    # https://github.com/dlang/dmd/pull/6680
-    license = licenses.boost;
-    maintainers = with maintainers; [ ThomasMader ];
-    platforms = platforms.unix;
+    doCheck = !bootstrapVersion;
+
+    checkPhase = ''
+        cd dmd
+        make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 DMD=${pathToDmd} BUILD=release SHARED=0 SHELL=$SHELL
+        cd ../druntime
+        make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${pathToDmd} BUILD=release
+        cd ..
+    '';
+    
+    extension = if stdenv.hostPlatform.isDarwin then "a" else "{a,so}";
+
+    installPhase = ''
+        cd dmd
+        mkdir $out
+        mkdir $out/bin
+        cp ${pathToDmd} $out/bin
+
+        mkdir -p $out/share/man/man1
+        mkdir -p $out/share/man/man5
+        cp -r docs/man/man1/* $out/share/man/man1/
+        cp -r docs/man/man5/* $out/share/man/man5/
+
+        cd ../druntime
+        mkdir $out/include
+        mkdir $out/include/d2
+        cp -r import/* $out/include/d2
+
+        cd ../phobos
+        mkdir $out/lib
+        cp generated/${osname}/release/${bits}/libphobos2.${extension} $out/lib
+
+        cp -r std $out/include/d2
+        cp -r etc $out/include/d2
+
+        wrapProgram $out/bin/dmd \
+            --prefix PATH ":" "${stdenv.cc}/bin" \
+            --set-default CC "$CC"
+
+        cd $out/bin
+        tee dmd.conf << EOF
+        [Environment]
+        DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--export-dynamic"} -fPIC
+        EOF
+    '';
+
+    meta = with stdenv.lib; {
+      description = "Official reference compiler for the D language";
+      homepage = http://dlang.org/;
+      # Everything is now Boost licensed, even the backend.
+      # https://github.com/dlang/dmd/pull/6680
+      license = licenses.boost;
+      maintainers = with maintainers; [ ThomasMader ];
+      platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
+    };
+  };
+
+  # Need to test Phobos in a fixed-output derivation, otherwise the
+  # network stuff in Phobos would fail if sandbox mode is enabled.
+  phobosUnittests = stdenv.mkDerivation rec {
+    name = "phobosUnittests-${version}";
+    version = dmdBuild.version;
+
+    enableParallelBuilding = dmdBuild.enableParallelBuilding;
+    preferLocalBuild = true;
+    inputString = dmdBuild.outPath;
+    outputHashAlgo = "sha256";
+    outputHash = builtins.hashString "sha256" inputString;
+
+    srcs = dmdBuild.srcs;
+
+    sourceRoot = ".";
+
+    postPatch = dmdBuild.phobosPatches;
+
+    nativeBuildInputs = dmdBuild.nativeBuildInputs;
+    buildInputs = dmdBuild.buildInputs;
+
+    buildPhase = ''
+        cd phobos
+        make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${dmdBuild}/bin/dmd BUILD=release
+    '';
+
+    installPhase = ''
+        echo -n $inputString > $out
+    '';
   };
+
+in
+
+stdenv.mkDerivation rec {
+  inherit phobosUnittests;
+  name = "dmd-${version}";
+  phases = "installPhase";
+  buildInputs = dmdBuild.buildInputs;
+
+  installPhase = ''
+    mkdir $out
+    cp -r --symbolic-link ${dmdBuild}/* $out/
+  '';
+  meta = dmdBuild.meta;
 }
+
diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix
index 7cba0cab351f..4520363a53b2 100644
--- a/pkgs/development/compilers/elm/default.nix
+++ b/pkgs/development/compilers/elm/default.nix
@@ -72,7 +72,9 @@ let
             where foo is a tag for a new version, for example "0.3.1-alpha".
             */
             elm-format = self.callPackage ./packages/elm-format.nix { };
-
+            elm-interface-to-json = self.callPackage ./packages/elm-interface-to-json.nix {
+              aeson-pretty = self.aeson-pretty_0_7_2;
+            };
           };
       in elmPkgs // {
         inherit elmPkgs;
diff --git a/pkgs/development/compilers/elm/packages/elm-interface-to-json.nix b/pkgs/development/compilers/elm/packages/elm-interface-to-json.nix
new file mode 100644
index 000000000000..3f797b7a2362
--- /dev/null
+++ b/pkgs/development/compilers/elm/packages/elm-interface-to-json.nix
@@ -0,0 +1,24 @@
+{ mkDerivation, aeson, aeson-pretty, base, binary, bytestring
+, concatenative, containers, directory, either, elm-compiler
+, filemanip, filepath, indents, optparse-applicative, parsec
+, stdenv, text, transformers, fetchgit
+}:
+mkDerivation {
+  pname = "elm-interface-to-json";
+  version = "0.1.0.0";
+  src = fetchgit {
+    url = "https://github.com/stoeffel/elm-interface-to-json";
+    sha256 = "1izc78w91m7nrc9i2b3lgy3kyjsy4d5mkkblx96ws0bp3dpm5f9k";
+    rev = "9884c1c997a55f11cf7c3d99a8afa72cf2e97323";
+  };
+  isLibrary = false;
+  isExecutable = true;
+  jailbreak = true;
+  executableHaskellDepends = [
+    aeson aeson-pretty base binary bytestring concatenative containers
+    directory either elm-compiler filemanip filepath indents
+    optparse-applicative parsec text transformers
+  ];
+  homepage = "https://github.com/githubuser/elm-interface-to-json#readme";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/pkgs/development/compilers/fpc/lazarus.nix b/pkgs/development/compilers/fpc/lazarus.nix
index 704d9d5be645..e646debd9d7e 100644
--- a/pkgs/development/compilers/fpc/lazarus.nix
+++ b/pkgs/development/compilers/fpc/lazarus.nix
@@ -8,10 +8,10 @@ stdenv, fetchurl
 let
   s =
   rec {
-    version = "1.6";
-    versionSuffix = ".0-0";
+    version = "1.8.0";
+    versionSuffix = "";
     url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}${versionSuffix}.tar.gz";
-    sha256 = "1a1w9yibi0rsr51bl7csnq6mr59x0934850kiabs80nr3sz05knb";
+    sha256 = "0i58ngrr1vjyazirfmz0cgikglc02z1m0gcrsfw9awpi3ax8h21j";
     name = "lazarus-${version}";
   };
   buildInputs = [
diff --git a/pkgs/development/compilers/gambit/default.nix b/pkgs/development/compilers/gambit/default.nix
index 79f57c42c50d..b70d3649bb9a 100644
--- a/pkgs/development/compilers/gambit/default.nix
+++ b/pkgs/development/compilers/gambit/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   name    = "gambit-${version}";
-  version = "4.8.8-300db59";
+  version = "4.8.8-415-g29ed48bb";
   bootstrap = import ./bootstrap.nix ( pkgs );
 
   src = fetchgit {
     url = "https://github.com/feeley/gambit.git";
-    rev = "300db59e1d3b66bcd597f617849df0274d2a4472";
-    sha256 = "1mhy49lasakgvdaswkxasdssik11lx3hfx4h1gs2b6881488ssdp";
+    rev = "29ed48bb688e8302d2430b5d24a2fc7c2039aeec";
+    sha256 = "1h3kmczvjir0pi6cmqa2bsc09n68jhw0bxq7m6w4b1f0xvgvn3fr";
   };
 
   buildInputs = [ openssl git autoconf bootstrap ];
diff --git a/pkgs/development/compilers/gerbil/default.nix b/pkgs/development/compilers/gerbil/default.nix
index 59cafee3b3a9..622107c75345 100644
--- a/pkgs/development/compilers/gerbil/default.nix
+++ b/pkgs/development/compilers/gerbil/default.nix
@@ -7,11 +7,11 @@
 stdenv.mkDerivation rec {
   name    = "gerbil-${version}";
 
-  version = "0.12-DEV-777-gd855915";
+  version = "0.12-DEV-836-gcde6802";
   src = fetchgit {
     url = "https://github.com/vyzo/gerbil.git";
-    rev = "9db6187dc996eec4087f83b86339e7b17bb69bad";
-    sha256 = "1hqmsy77d62dvil3az4vdr0rmwvxhinjl1dbcxzamz2c2kcjv1jg";
+    rev = "2904b0014fac344409d0ae2ba5835d0e67ac83b5";
+    sha256 = "1nnirqdd11n6pkvidnf8pb39m45jjnpmwj2qy62di024r7ha3y18";
   };
 
   buildInputs = [
@@ -52,9 +52,9 @@ stdenv.mkDerivation rec {
 export GERBIL_HOME=$out
 case "\$1" in -:*) GSIOPTIONS=\$1 ; shift ;; esac
 if [[ \$# = 0 ]] ; then
-  ${gambit}/bin/gsi \$GSIOPTIONS \$GERBIL_HOME/lib/gxi-init \$GERBIL_HOME/lib/gxi-interactive - ;
+  exec ${gambit}/bin/gsi \$GSIOPTIONS \$GERBIL_HOME/lib/gxi-init \$GERBIL_HOME/lib/gxi-interactive - ;
 else
-  ${gambit}/bin/gsi \$GSIOPTIONS \$GERBIL_HOME/lib/gxi-init "\$@"
+  exec ${gambit}/bin/gsi \$GSIOPTIONS \$GERBIL_HOME/lib/gxi-init "\$@"
 fi
 EOF
     runHook postInstall
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index 92ba3f6a46ed..3f5dfa65958f 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -5,7 +5,7 @@
   # If enabled GHC will be build with the GPL-free but slower integer-simple
   # library instead of the faster but GPLed integer-gmp library.
 , enableIntegerSimple ? false, gmp
-, version ? "8.3.20170808"
+, version ? "8.5.20171209"
 }:
 
 let
@@ -13,7 +13,7 @@ let
 
   commonBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
 
-  rev = "14457cf6a50f708eecece8f286f08687791d51f7";
+  rev = "4335c07ca7e64624819b22644d7591853826bd75";
 
   commonPreConfigure =  ''
     echo ${version} >VERSION
@@ -34,7 +34,7 @@ in stdenv.mkDerivation (rec {
   src = fetchgit {
     url = "git://git.haskell.org/ghc.git";
     inherit rev;
-    sha256 = "08vj9ca7rq7rv8pjfl14fg2lg9d6zisrwlq6bi5vzr006816dy8y";
+    sha256 = "19csad94sk0bw2nj97ppmnwh4c193jg0jmg5w2sx9rqm9ih4yg85";
   };
 
   postPatch = "patchShebangs .";
diff --git a/pkgs/development/compilers/go/1.8.nix b/pkgs/development/compilers/go/1.8.nix
index 538c20bac72a..210f259df89a 100644
--- a/pkgs/development/compilers/go/1.8.nix
+++ b/pkgs/development/compilers/go/1.8.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin
-, perl, which, pkgconfig, patch, fetchpatch
+, perl, which, pkgconfig, patch, procps
 , pcre, cacert, llvm
 , Security, Foundation, bash
 , makeWrapper, git, subversion, mercurial, bazaar }:
@@ -35,7 +35,8 @@ stdenv.mkDerivation rec {
   };
 
   # perl is used for testing go vet
-  nativeBuildInputs = [ perl which pkgconfig patch makeWrapper ];
+  nativeBuildInputs = [ perl which pkgconfig patch makeWrapper ]
+    ++ optionals stdenv.isLinux [ procps ];
   buildInputs = [ pcre ]
     ++ optionals stdenv.isLinux [ stdenv.glibc.out stdenv.glibc.static ];
   propagatedBuildInputs = optionals stdenv.isDarwin [ Security Foundation ];
@@ -144,6 +145,7 @@ stdenv.mkDerivation rec {
     export GOROOT=$out/share/go
     export GOBIN=$GOROOT/bin
     export PATH=$GOBIN:$PATH
+    ulimit -a
   '';
 
   postConfigure = optionalString stdenv.isDarwin ''
diff --git a/pkgs/development/compilers/go/1.9.nix b/pkgs/development/compilers/go/1.9.nix
index 007b81d995b7..8708bd762c4d 100644
--- a/pkgs/development/compilers/go/1.9.nix
+++ b/pkgs/development/compilers/go/1.9.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin
-, perl, which, pkgconfig, patch, fetchpatch
+, perl, which, pkgconfig, patch, procps
 , pcre, cacert, llvm
 , Security, Foundation, bash
 , makeWrapper, git, subversion, mercurial, bazaar }:
@@ -35,7 +35,8 @@ stdenv.mkDerivation rec {
   };
 
   # perl is used for testing go vet
-  nativeBuildInputs = [ perl which pkgconfig patch makeWrapper ];
+  nativeBuildInputs = [ perl which pkgconfig patch makeWrapper ]
+    ++ optionals stdenv.isLinux [ procps ];
   buildInputs = [ pcre ]
     ++ optionals stdenv.isLinux [ stdenv.glibc.out stdenv.glibc.static ];
   propagatedBuildInputs = optionals stdenv.isDarwin [ Security Foundation ];
@@ -150,6 +151,7 @@ stdenv.mkDerivation rec {
     export GOROOT=$out/share/go
     export GOBIN=$GOROOT/bin
     export PATH=$GOBIN:$PATH
+    ulimit -a
   '';
 
   postConfigure = optionalString stdenv.isDarwin ''
diff --git a/pkgs/development/compilers/hhvm/default.nix b/pkgs/development/compilers/hhvm/default.nix
index 4159b7bd52b7..2f84387a8888 100644
--- a/pkgs/development/compilers/hhvm/default.nix
+++ b/pkgs/development/compilers/hhvm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, fetchurl, cmake, pkgconfig, boost, libunwind, libmemcached
+{ stdenv, fetchgit, cmake, pkgconfig, boost, libunwind, libmemcached
 , pcre, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php
 , expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog, libkrb5
 , bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
@@ -8,13 +8,13 @@
 
 stdenv.mkDerivation rec {
   name    = "hhvm-${version}";
-  version = "3.21";
+  version = "3.23.2";
 
   # use git version since we need submodules
   src = fetchgit {
     url    = "https://github.com/facebook/hhvm.git";
-    rev    = "56483773e2edd9e61782f1901ce40e47959e71b8";
-    sha256 = "0dmdk98nv04m0fv6909gfbsxqlkckn369yi7kadhir0r7vxsj7wa";
+    rev    = "HHVM-${version}";
+    sha256 = "1nic49j8nghx82lgvz0b95r78sqz46qaaqv4nx48p8yrj9ysnd7i";
     fetchSubmodules = true;
   };
 
@@ -29,10 +29,6 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./flexible-array-members-gcc6.patch
-    (fetchurl {
-      url = https://github.com/facebook/hhvm/commit/b506902af2b7c53de6d6c92491c2086472292004.patch;
-      sha256 = "1br7diczqks6b1xjrdsac599fc62m9l17gcx7dvkc0qj54lq7ys4";
-    })
   ];
 
   enableParallelBuilding = true;
diff --git a/pkgs/development/compilers/jetbrains-jdk/default.nix b/pkgs/development/compilers/jetbrains-jdk/default.nix
index aa3f49ca4d9f..7f23a4d507e7 100644
--- a/pkgs/development/compilers/jetbrains-jdk/default.nix
+++ b/pkgs/development/compilers/jetbrains-jdk/default.nix
@@ -16,7 +16,7 @@ let drv = stdenv.mkDerivation rec {
       sha256 = "1768f02i3dxdbxn8n29d522h8v0mkgnhpb8ixzq5p54vwjmfl6md";
     }
   else
-    abort "unsupported system: ${stdenv.system}";
+    throw "unsupported system: ${stdenv.system}";
 
   nativeBuildInputs = [ file ];
 
@@ -73,7 +73,7 @@ let drv = stdenv.mkDerivation rec {
      your own risk.
     '';
     homepage = "https://bintray.com/jetbrains/intellij-jdk/";
-    licenses = licenses.gpl2;
+    license = licenses.gpl2;
     maintainers = with maintainers; [ edwtjo ];
     platforms = with platforms; [ "x86_64-linux" ];
   };
diff --git a/pkgs/development/compilers/julia/0.5.nix b/pkgs/development/compilers/julia/0.5.nix
index 1ce60d40716d..0cf933ee4d20 100644
--- a/pkgs/development/compilers/julia/0.5.nix
+++ b/pkgs/development/compilers/julia/0.5.nix
@@ -160,7 +160,6 @@ stdenv.mkDerivation rec {
   # Julia's tests require read/write access to $HOME
   preCheck = ''
     export HOME="$NIX_BUILD_TOP"
-    set
   '';
 
   preBuild = ''
diff --git a/pkgs/development/compilers/julia/0.6.nix b/pkgs/development/compilers/julia/0.6.nix
index 99e6f8efff10..fabb2a7d6d73 100644
--- a/pkgs/development/compilers/julia/0.6.nix
+++ b/pkgs/development/compilers/julia/0.6.nix
@@ -163,7 +163,6 @@ stdenv.mkDerivation rec {
   # Julia's tests require read/write access to $HOME
   preCheck = ''
     export HOME="$NIX_BUILD_TOP"
-    set
   '';
 
   preBuild = ''
diff --git a/pkgs/development/compilers/ldc/default.nix b/pkgs/development/compilers/ldc/default.nix
index 5c283dd4380c..73d798bb66fd 100644
--- a/pkgs/development/compilers/ldc/default.nix
+++ b/pkgs/development/compilers/ldc/default.nix
@@ -1,103 +1,261 @@
-{ stdenv, fetchFromGitHub, cmake, llvm, dmd, curl, tzdata, python,
-  lit, gdb, unzip, darwin }:
+{ stdenv, fetchgit, fetchurl, cmake, llvm, curl, tzdata
+, python, libconfig, lit, gdb, unzip, darwin, bash
+, callPackage
+, bootstrapVersion ? false
+, version ? "1.5.0"
+, ldcSha256 ? "1150sgns03vplni2wd4afk3rgw3rap8rsiipspw0rzxgki5rlr83"
+}:
 
-stdenv.mkDerivation rec {
-  name = "ldc-${version}";
-  version = "1.3.0";
-
-  srcs = [
-  (fetchFromGitHub {
-    owner = "ldc-developers";
-    repo = "ldc";
-    rev = "v${version}";
-    sha256 = "1ac3j4cwwgjpayhijxx4d6478bc3iqksjxkd7xp7byx7k8w1ppdl";
-    name = "ldc-v${version}-src";
-  })
-  (fetchFromGitHub {
-    owner = "ldc-developers";
-    repo = "druntime";
-    rev = "ldc-v${version}";
-    sha256 = "1m13370wnj3sizqk3sdpzi9am5d24srf27d613qblhqa9n8vwz30";
-    name = "druntime-ldc-v${version}-src";
-  })
-  (fetchFromGitHub {
-    owner = "ldc-developers";
-    repo = "phobos";
-    rev = "ldc-v${version}";
-    sha256 = "0fhcdfi7a00plwj27ysfyv783nhk0kspq7hawf6vbsl3s1nyvn8g";
-    name = "phobos-ldc-v${version}-src";
-  })
-  (fetchFromGitHub {
-    owner = "ldc-developers";
-    repo = "dmd-testsuite";
-    rev = "ldc-v${version}";
-    sha256 = "0dmdkp220gqhxjrmrjfkf0vsvylwfaj70hswavq4q3v4dg17pzmj";
-    name = "dmd-testsuite-ldc-v${version}-src";
-  })
-  ];
-
-  sourceRoot = ".";
-
-  postUnpack = ''
-      mv ldc-v${version}-src/* .
-
-      mv druntime-ldc-v${version}-src/* runtime/druntime
-
-      mv phobos-ldc-v${version}-src/* runtime/phobos
-
-      mv dmd-testsuite-ldc-v${version}-src/* tests/d2/dmd-testsuite
-
-      # Remove cppa test for now because it doesn't work.
-      rm tests/d2/dmd-testsuite/runnable/cppa.d
-      rm tests/d2/dmd-testsuite/runnable/extra-files/cppb.cpp
-  '';
+let
 
-  postPatch = ''
-      substituteInPlace runtime/phobos/std/net/curl.d \
-          --replace libcurl.so ${curl.out}/lib/libcurl.so
+  bootstrapLdc = if !bootstrapVersion then
+    # LDC 0.17.x is the last version which doesn't need a working D compiler to
+    # build so we use that version to bootstrap the actual build.
+    callPackage ./default.nix {
+      bootstrapVersion = true;
+      version = "0.17.5";
+      ldcSha256 = "0200r5y8hs5yv2cx24csgyh00dlg18877b9cfblixypr6nhl19bs";
+    }
+  else
+    "";
 
-      # Ugly hack to fix the hardcoded path to zoneinfo in the source file.
-      # https://issues.dlang.org/show_bug.cgi?id=15391
-      substituteInPlace runtime/phobos/std/datetime.d \
-          --replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
-  ''
+  ldcBuild = stdenv.mkDerivation rec {
+    name = "ldcBuild-${version}";
 
-  + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
-      substituteInPlace driver/tool.cpp \
-          --replace "gcc" "clang"
-  '';
+    enableParallelBuilding = true;
 
-  nativeBuildInputs = [ cmake llvm dmd python lit gdb unzip ]
+    src = fetchurl {
+      url = "https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz";
+      sha256 = ldcSha256;
+    };
 
-  ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
-    Foundation
-  ]);
+    sourceRoot = ".";
 
-  buildInputs = [ curl tzdata stdenv.cc ];
+    postUnpack = ''
+        cd ldc-${version}-src/
 
-  preConfigure = ''
-    cmakeFlagsArray=("-DINCLUDE_INSTALL_DIR=$out/include/dlang/ldc")
-  '';
+        patchShebangs .
 
-  postConfigure = ''
-    export DMD=$PWD/bin/ldc2
-  '';
+        # Remove cppa test for now because it doesn't work.
+        rm tests/d2/dmd-testsuite/runnable/cppa.d
+        rm tests/d2/dmd-testsuite/runnable/extra-files/cppb.cpp
+    ''
 
-  makeFlags = [ "DMD=$DMD" ];
+    + stdenv.lib.optionalString (bootstrapVersion) ''
+        # ... runnable/variadic.d            ()
+        #Test failed.  The logged output:
+        #/tmp/nix-build-ldcBuild-0.17.5.drv-0/ldc-0.17.5-src/build/bin/ldmd2 -conf= -m64 -Irunnable   -od/tmp/nix-build-ldcBuild-0.17.5.drv-0/ldc-0.17.5-src/build/dmd-testsuite/runnable -of/tmp/nix-build-ldcBuild-0.17.5.drv-0/ldc-0.17.5-src/build/dmd-testsuite/runnable/variadic_0 runnable/variadic.d
+        #Error: integer constant expression expected instead of <cant>
+        #Error: integer constant expression expected instead of <cant>
+        #Error: integer constant expression expected instead of <cant>
+        #Error: integer constant expression expected instead of <cant>
+        #Error: integer constant expression expected instead of <cant>
+        #runnable/variadic.d(84): Error: template instance variadic.Foo3!(int, int, int) error instantiating
+        #
+        #
+        #==============================
+        #Test failed: expected rc == 0, exited with rc == 1
+        rm tests/d2/dmd-testsuite/runnable/variadic.d
+    ''
 
-  # disable check phase because some tests are not working with sandboxing
-  doCheck = false;
+    + stdenv.lib.optionalString (!bootstrapVersion) ''
+        # https://github.com/NixOS/nixpkgs/issues/29611
+        rm tests/sanitizers/asan_*
+    '';
 
-  checkPhase = ''
-      ctest -j $NIX_BUILD_CORES -V DMD=$DMD
-  '';
+    ROOT_HOME_DIR = "$(echo ~root)";
+
+    datetimePath = if bootstrapVersion then
+      "phobos/std/datetime.d"
+    else
+      "phobos/std/datetime/timezone.d";
+
+    postPatch = ''
+        substituteInPlace cmake/Modules/FindLLVM.cmake \
+            --replace "llvm_set(LIBRARY_DIRS" "#llvm_set(LIBRARY_DIRS"
+
+        substituteInPlace runtime/${datetimePath} \
+            --replace "import core.time;" "import core.time;import std.path;"
+
+        substituteInPlace runtime/${datetimePath} \
+            --replace "tzName == \"leapseconds\"" "baseName(tzName) == \"leapseconds\""
+
+        substituteInPlace runtime/phobos/std/net/curl.d \
+            --replace libcurl.so ${curl.out}/lib/libcurl.so
+
+        # Ugly hack to fix the hardcoded path to zoneinfo in the source file.
+        # https://issues.dlang.org/show_bug.cgi?id=15391
+        substituteInPlace runtime/${datetimePath} \
+            --replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
+
+        substituteInPlace tests/d2/dmd-testsuite/Makefile \
+            --replace "SHELL=/bin/bash" "SHELL=${bash}/bin/bash"
+    ''
+
+    + stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
+        # See https://github.com/NixOS/nixpkgs/issues/29443
+        substituteInPlace runtime/phobos/std/path.d \
+            --replace "\"/root" "\"${ROOT_HOME_DIR}"
+
+        # TODO
+        substituteInPlace runtime/druntime/src/core/memory.d \
+            --replace "assert(z is null);" "//assert(z is null);"
+    ''
+
+    + stdenv.lib.optionalString (bootstrapVersion && stdenv.hostPlatform.isDarwin) ''
+        # https://github.com/ldc-developers/ldc/pull/2306
+        # Can be removed on bootstrap version > 0.17.5
+        substituteInPlace gen/programs.cpp \
+            --replace "gcc" "clang"
+
+	# Was not able to compile on darwin due to "__inline_isnanl"
+	# being undefined.
+	substituteInPlace dmd2/root/port.c --replace __inline_isnanl __inline_isnan
+    ''
+
+    + stdenv.lib.optionalString (stdenv.hostPlatform.isLinux && bootstrapVersion) ''
+      substituteInPlace dmd2/root/port.c \
+        --replace "#include <bits/mathdef.h>" "#include <complex.h>"
+    ''
+
+    + stdenv.lib.optionalString (bootstrapVersion) ''
+        substituteInPlace runtime/${datetimePath} \
+            --replace "import std.traits;" "import std.traits;import std.path;"
+
+        substituteInPlace runtime/${datetimePath} \
+            --replace "tzName == \"+VERSION\"" "baseName(tzName) == \"leapseconds\" || tzName == \"+VERSION\""
+    '';
+
+    nativeBuildInputs = [ cmake llvm bootstrapLdc python lit gdb unzip ]
+
+    ++ stdenv.lib.optional (bootstrapVersion) [
+      libconfig
+    ]
+
+    ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
+      Foundation
+    ]);
+
+
+    buildInputs = [ curl tzdata stdenv.cc ];
+
+    preConfigure = ''
+      cmakeFlagsArray=("-DINCLUDE_INSTALL_DIR=$out/include/dlang/ldc"
+                       "-DCMAKE_BUILD_TYPE=Release"
+                       "-DCMAKE_SKIP_RPATH=ON"
+                       "-DBUILD_SHARED_LIBS=OFF"
+                       "-DLDC_WITH_LLD=OFF"
+                       # Xcode 9.0.1 fixes that bug according to ldc release notes
+                       "-DRT_ARCHIVE_WITH_LDC=OFF"
+                       "-DLLVM_LIBRARY_DIRS=${llvm}/lib"
+                      )
+    '';
+
+
+    postConfigure = ''
+      export DMD=$PWD/bin/ldmd2
+    '';
 
-  meta = with stdenv.lib; {
-    description = "The LLVM-based D compiler";
-    homepage = https://github.com/ldc-developers/ldc;
-    # from https://github.com/ldc-developers/ldc/blob/master/LICENSE
-    license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ];
-    maintainers = with maintainers; [ ThomasMader ];
-    platforms = platforms.unix;
+    makeFlags = [ "DMD=$DMD" ];
+
+    doCheck = true;
+
+    checkPhase = ''
+	# Build and run LDC D unittests.
+	ctest --output-on-failure -R "ldc2-unittest"
+	# Run LIT testsuite.
+	ctest -V -R "lit-tests"
+	# Run DMD testsuite.
+	DMD_TESTSUITE_MAKE_ARGS=-j$NIX_BUILD_CORES ctest -V -R "dmd-testsuite"
+    '';
+
+    meta = with stdenv.lib; {
+      description = "The LLVM-based D compiler";
+      homepage = https://github.com/ldc-developers/ldc;
+      # from https://github.com/ldc-developers/ldc/blob/master/LICENSE
+      license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ];
+      maintainers = with maintainers; [ ThomasMader ];
+      platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
+    };
+  };
+
+  # Need to test Phobos in a fixed-output derivation, otherwise the
+  # network stuff in Phobos would fail if sandbox mode is enabled.
+  ldcUnittests = stdenv.mkDerivation rec {
+    name = "ldcUnittests-${version}";
+
+    enableParallelBuilding = ldcBuild.enableParallelBuilding;
+    preferLocalBuild = true;
+    inputString = ldcBuild.outPath;
+    outputHashAlgo = "sha256";
+    outputHash = builtins.hashString "sha256" inputString;
+
+    src = ldcBuild.src;
+
+    sourceRoot = ".";
+
+    postUnpack = ldcBuild.postUnpack;
+
+    postPatch = ldcBuild.postPatch;
+
+    nativeBuildInputs = ldcBuild.nativeBuildInputs
+
+    ++ [
+      ldcBuild
+    ];
+
+    buildInputs = ldcBuild.buildInputs;
+
+    preConfigure = ''
+      cmakeFlagsArray=( "-DINCLUDE_INSTALL_DIR=$out/include/dlang/ldc"
+                        "-DCMAKE_BUILD_TYPE=Release"
+                        "-DCMAKE_SKIP_RPATH=ON"
+                        "-DBUILD_SHARED_LIBS=OFF"
+                        "-DLDC_WITH_LLD=OFF"
+                        # Xcode 9.0.1 fixes that bug according to ldc release notes
+                        "-DRT_ARCHIVE_WITH_LDC=OFF"
+                        "-DLLVM_LIBRARY_DIRS=${llvm}/lib"
+                        "-DD_COMPILER=${ldcBuild}/bin/ldmd2"
+                      )
+    '';
+
+    postConfigure = ldcBuild.postConfigure;
+
+    makeFlags = ldcBuild.makeFlags;
+
+    buildCmd = if bootstrapVersion then
+      "ctest -V -R \"build-druntime-ldc-unittest|build-phobos2-ldc-unittest\""
+    else
+      "make -j$NIX_BUILD_CORES DMD=${ldcBuild}/bin/ldc2 druntime-test-runner druntime-test-runner-debug phobos2-test-runner phobos2-test-runner-debug";
+
+    testCmd = if bootstrapVersion then
+      "ctest -j$NIX_BUILD_CORES --output-on-failure -E \"dmd-testsuite|lit-tests|ldc2-unittest|llvm-ir-testsuite\""
+    else
+      "ctest -j$NIX_BUILD_CORES --output-on-failure -E \"dmd-testsuite|lit-tests|ldc2-unittest\"";
+
+    buildPhase = ''
+        ${buildCmd}
+        ${testCmd}
+    '';
+
+    installPhase = ''
+        echo -n $inputString > $out
+    '';
   };
+
+in
+
+stdenv.mkDerivation rec {
+  inherit ldcUnittests;
+  name = "ldc-${version}";
+  phases = "installPhase";
+  buildInputs = ldcBuild.buildInputs;
+
+  installPhase = ''
+    mkdir $out
+    cp -r --symbolic-link ${ldcBuild}/* $out/
+  '';
+
+  meta = ldcBuild.meta;
 }
+
diff --git a/pkgs/development/compilers/mono/4.4.nix b/pkgs/development/compilers/mono/4.4.nix
index 1ec679e6e41b..f80cffe220ea 100644
--- a/pkgs/development/compilers/mono/4.4.nix
+++ b/pkgs/development/compilers/mono/4.4.nix
@@ -4,4 +4,5 @@ callPackage ./generic.nix (rec {
   inherit Foundation libobjc;
   version = "4.4.2.11";
   sha256 = "0cxnypw1j7s253wr5hy05k42ghgg2s9qibp10kndwnp5bv12q34h";
+  enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65565737
 })
diff --git a/pkgs/development/compilers/mono/4.6.nix b/pkgs/development/compilers/mono/4.6.nix
index 283c34efb321..7c9918cdd397 100644
--- a/pkgs/development/compilers/mono/4.6.nix
+++ b/pkgs/development/compilers/mono/4.6.nix
@@ -4,4 +4,5 @@ callPackage ./generic.nix (rec {
   inherit Foundation libobjc;
   version = "4.6.2.16";
   sha256 = "190f7kcrm1y5x61s1xwdmjnwc3czsg50s3mml4xmix7byh3x2rc9";
+  enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65617511
 })
diff --git a/pkgs/development/compilers/mono/4.8.nix b/pkgs/development/compilers/mono/4.8.nix
index 6d870ae30680..c3ba316cd13b 100644
--- a/pkgs/development/compilers/mono/4.8.nix
+++ b/pkgs/development/compilers/mono/4.8.nix
@@ -4,4 +4,5 @@ callPackage ./generic-cmake.nix (rec {
   inherit Foundation libobjc;
   version = "4.8.1.0";
   sha256 = "1vyvp2g28ihcgxgxr8nhzyzdmzicsh5djzk8dk1hj5p5f2k3ijqq";
+  enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65600645
 })
diff --git a/pkgs/development/compilers/mono/5.0.nix b/pkgs/development/compilers/mono/5.0.nix
index 911ba0ae02a7..d10d6e3e6053 100644
--- a/pkgs/development/compilers/mono/5.0.nix
+++ b/pkgs/development/compilers/mono/5.0.nix
@@ -4,4 +4,5 @@ callPackage ./generic-cmake.nix (rec {
   inherit Foundation libobjc;
   version = "5.0.1.1";
   sha256 = "064pgsmanpybpbhpam9jv9n8aicx6mlyb7a91yzh3kcksmqsxmj8";
+  enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65820147
 })
diff --git a/pkgs/development/compilers/mono/generic-cmake.nix b/pkgs/development/compilers/mono/generic-cmake.nix
index f6e3f5a0100b..de19e4b633e7 100644
--- a/pkgs/development/compilers/mono/generic-cmake.nix
+++ b/pkgs/development/compilers/mono/generic-cmake.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256, autoconf, libtool, automake, cmake, which }:
+{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256, autoconf, libtool, automake, cmake, which, enableParallelBuilding ? true }:
 
 let
   llvm     = callPackage ./llvm.nix { };
@@ -45,9 +45,6 @@ stdenv.mkDerivation rec {
   # The file /nix/store/xxx-mono-2.4.2.1/lib/mscorlib.dll is an invalid CIL image
   dontStrip = true;
 
-  # Parallel building doesn't work, as shows http://hydra.nixos.org/build/2983601
-  enableParallelBuilding = false;
-
   # We want pkg-config to take priority over the dlls in the Mono framework and the GAC
   # because we control pkg-config
   patches = [ ./pkgconfig-before-gac.patch ];
@@ -83,6 +80,8 @@ stdenv.mkDerivation rec {
     ln -s $out/bin/mcs $out/bin/gmcs
   '';
 
+  inherit enableParallelBuilding;
+
   meta = {
     homepage = http://mono-project.com/;
     description = "Cross platform, open source .NET development framework";
diff --git a/pkgs/development/compilers/mono/generic.nix b/pkgs/development/compilers/mono/generic.nix
index 3bc962859e28..51e39593fe14 100644
--- a/pkgs/development/compilers/mono/generic.nix
+++ b/pkgs/development/compilers/mono/generic.nix
@@ -1,4 +1,11 @@
-{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256 }:
+{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11
+, callPackage, ncurses, zlib
+, cacert, Foundation, libobjc, python
+
+, version, sha256
+, withLLVM ? false
+, enableParallelBuilding ? true
+}:
 
 let
   llvm     = callPackage ./llvm.nix { };
@@ -40,9 +47,6 @@ stdenv.mkDerivation rec {
   # The file /nix/store/xxx-mono-2.4.2.1/lib/mscorlib.dll is an invalid CIL image
   dontStrip = true;
 
-  # Parallel building doesn't work, as shows http://hydra.nixos.org/build/2983601
-  enableParallelBuilding = false;
-
   # We want pkg-config to take priority over the dlls in the Mono framework and the GAC
   # because we control pkg-config
   patches = [ ./pkgconfig-before-gac.patch ];
@@ -79,6 +83,8 @@ stdenv.mkDerivation rec {
     ln -s $out/bin/mcs $out/bin/gmcs
   '';
 
+  inherit enableParallelBuilding;
+
   meta = {
     homepage = http://mono-project.com/;
     description = "Cross platform, open source .NET development framework";
diff --git a/pkgs/development/compilers/nasm/default.nix b/pkgs/development/compilers/nasm/default.nix
index a84c5bbf7605..5394f2bcbbfb 100644
--- a/pkgs/development/compilers/nasm/default.nix
+++ b/pkgs/development/compilers/nasm/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "nasm-${version}";
-  version = "2.13.01";
+  version = "2.13.02";
 
   src = fetchurl {
     url = "http://www.nasm.us/pub/nasm/releasebuilds/${version}/${name}.tar.bz2";
-    sha256 = "1ylqs4sqh0paia970v6hpdgq5icxns9zlg21qql232bz1apppy88";
+    sha256 = "1gmvjckxvkmx1kbglgrakc98qhy55xlqlk5flrdihz5yhv92hc4d";
   };
 
   nativeBuildInputs = [ perl ];
diff --git a/pkgs/development/compilers/neko/default.nix b/pkgs/development/compilers/neko/default.nix
index 5b90dc7debc1..9edceead55e8 100644
--- a/pkgs/development/compilers/neko/default.nix
+++ b/pkgs/development/compilers/neko/default.nix
@@ -50,6 +50,7 @@ stdenv.mkDerivation rec {
     bin/neko bin/test.n
   '';
 
+  doCheck = true;
   dontStrip = true;
 
   meta = with stdenv.lib; {
@@ -60,4 +61,3 @@ stdenv.mkDerivation rec {
     platforms = platforms.linux ++ platforms.darwin;
   };
 }
-
diff --git a/pkgs/development/compilers/ocaml/ber-metaocaml-003.nix b/pkgs/development/compilers/ocaml/ber-metaocaml-104.nix
index c95d29326a4e..81c8cd534025 100644
--- a/pkgs/development/compilers/ocaml/ber-metaocaml-003.nix
+++ b/pkgs/development/compilers/ocaml/ber-metaocaml-104.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses, xlibsWrapper }:
+{ stdenv, fetchurl, ncurses, libX11, xproto, buildEnv }:
 
 let
    useX11 = stdenv.isi686 || stdenv.isx86_64;
@@ -7,52 +7,65 @@ let
 in
 
 stdenv.mkDerivation rec {
-  
+
   name = "ber-metaocaml-${version}";
-  version = "003";
-  
+  version = "104";
+
   src = fetchurl {
-    url = "http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.2.tar.bz2";
-    sha256 = "0hw1yp1mmfyn1pmda232d0ry69m7ln1z0fn5lgi8nz3y1mx3iww6";
+    url = "http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-4.04.0.tar.gz";
+    sha256 = "1pi2hdm9lxhn45qvfqfss1hpa4jijm14qgmrgajsadxqdiplhqyb";
   };
 
   metaocaml = fetchurl {
-    url = "http://okmij.org/ftp/ML/ber-metaocaml.tar.gz";
-    sha256 = "1kq1if25c1wvcdiy4g46xk05dkc1am2gc4qvmg4x19wvvaz09gzf";
+    url = "http://okmij.org/ftp/ML/ber-metaocaml-104.tar.gz";
+    sha256 = "1gmwlxairxqcmqa2r6kbf8b4dxc7pfhfbh48g1s14d3z20rj8nib";
   };
 
   # Needed to avoid a SIGBUS on the final executable on mips
   NIX_CFLAGS_COMPILE = if stdenv.isMips then "-fPIC" else "";
 
-  patches = optionals stdenv.isDarwin [ ./gnused-on-osx-fix.patch ];
+  x11env = buildEnv { name = "x11env"; paths = [libX11 xproto];};
+  x11lib = x11env + "/lib";
+  x11inc = x11env + "/include";
 
   prefixKey = "-prefix ";
-  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" xlibsWrapper ];
-  buildFlags = "core coreboot all"; # "world" + optionalString useNativeCompilers " bootstrap world.opt";
-  buildInputs = [ncurses] ++ optionals useX11 [ xlibsWrapper ];
+  configureFlags = optionals useX11 [ "-x11lib" x11lib
+                                      "-x11include" x11inc ];
+
+  dontStrip = true;
+  buildInputs = [ncurses] ++ optionals useX11 [ libX11 xproto ];
   installFlags = "-i";
   installTargets = "install"; # + optionalString useNativeCompilers " installopt";
-  prePatch = ''
-    CAT=$(type -tp cat)
-    sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
-    patch -p0 < ${./mips64.patch}
-  '';
+
   postConfigure = ''
     tar -xvzf $metaocaml
     cd ${name}
     make patch
     cd ..
   '';
-  postBuild = ''
+  buildPhase = ''
+    make world
+    make -i install
+
+    make bootstrap
+    make opt.opt
+    make installopt
     mkdir -p $out/include
     ln -sv $out/lib/ocaml/caml $out/include/caml
-  '';
-  postInstall = ''
     cd ${name}
     make all
     make install
+    make install.opt
+    cd ..
+ '';
+  installPhase = "";
+  postBuild = ''
+  '';
+  checkPhase = ''
+    cd ${name}
     make test
     make test-compile
+    make test-native
     cd ..
   '';
 
@@ -67,6 +80,5 @@ stdenv.mkDerivation rec {
       A conservative extension of OCaml with the primitive type of code values,
       and three basic multi-stage expression forms: Brackets, Escape, and Run
     '';
-    broken = true;
   };
 }
diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
index c2866446f76f..554c322781fc 100644
--- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
@@ -4,6 +4,7 @@
 , sha256_i686
 , sha256_x86_64
 , sha256_armv7l
+, sha256_aarch64
 , jceName
 , jceDownloadUrl
 , sha256JCE
@@ -38,11 +39,12 @@
 
 assert stdenv.system == "i686-linux"
     || stdenv.system == "x86_64-linux"
-    || stdenv.system == "armv7l-linux";
+    || stdenv.system == "armv7l-linux"
+    || stdenv.system == "aarch64-linux";
 assert swingSupport -> xorg != null;
 
 let
-  abortArch = abort "jdk requires i686-linux, x86_64-linux, or armv7l-linux";
+  abortArch = throw "Unsupported system: ${stdenv.system}";
 
   /**
    * The JRE libraries are in directories that depend on the CPU.
@@ -54,6 +56,8 @@ let
       "amd64"
     else if stdenv.system == "armv7l-linux" then
       "arm"
+    else if stdenv.system == "aarch64-linux" then
+      "aarch64"
     else
       abortArch;
 
@@ -99,6 +103,12 @@ let result = stdenv.mkDerivation rec {
         url = downloadUrl;
         sha256 = sha256_armv7l;
       }
+    else if stdenv.system == "aarch64-linux" then
+      requireFile {
+        name = "jdk-${productVersion}u${patchVersion}-linux-arm64-vfp-hflt.tar.gz";
+        url = downloadUrl;
+        sha256 = sha256_aarch64;
+      }
     else
       abortArch;
 
@@ -116,7 +126,7 @@ let result = stdenv.mkDerivation rec {
     # Set PaX markings
     exes=$(file $sourceRoot/bin/* $sourceRoot/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
     for file in $exes; do
-      paxmark m "$file"
+      paxmark m "$file" || true
       # On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well.
       ${stdenv.lib.optionalString stdenv.isi686 ''paxmark msp "$file"''}
     done
@@ -212,7 +222,7 @@ let result = stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     license = licenses.unfree;
-    platforms = [ "i686-linux" "x86_64-linux" "armv7l-linux" ]; # some inherit jre.meta.platforms
+    platforms = [ "i686-linux" "x86_64-linux" "armv7l-linux" "aarch64-linux" ]; # some inherit jre.meta.platforms
   };
 
 }; in result
diff --git a/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
index f8f37160a26f..f3d032f7b1bb 100644
--- a/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
@@ -4,7 +4,8 @@ import ./jdk-linux-base.nix {
   downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html;
   sha256_i686 = "0w1snn9hxwvdnk77frhdzbsm6v30v99dy5zmpy8ij7yxd57z6ql0";
   sha256_x86_64 = "0zq2dxbxmshz080yskhc8y2wbqi0y0kl9girxjbb4rwk837010n7";
-  sha256_armv7l = "10r3nyssx8piyjaspravwgj2bnq4537041pn0lz4fk5b3473kgfb";
+  sha256_armv7l = "0fdkvg1al7g9lqbq10rlw400aqr0xxi2a802319sw5n0zipkrjic";
+  sha256_aarch64 = "1xva22cjjpwa95h7x3xzyymn1bgxp1q67j5j304kn6cqah4k31j1";
   jceName = "jce_policy-8.zip";
   jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
   sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";
diff --git a/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
index 863621bf6b07..0703ec4a37ab 100644
--- a/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
@@ -4,7 +4,8 @@ import ./jdk-linux-base.nix {
   downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html;
   sha256_i686 = "0gjc7kcfx40f43z1w1qsn1fqxdz8d46wml2g11qgm55ishhv2q7w";
   sha256_x86_64 = "1gv1348hrgna9l3sssv3g9jzs37y1lkx05xq83chav9z1hs3p2r1";
-  sha256_armv7l = "10r3nyssx8piyjaspravwgj2bnq4537041pn0lz4fk5b3473kgfb";
+  sha256_armv7l = "1w0hwslsd3z0kvb3z7gmbh20xsyiz73vglmdqz2108y7alim7arm";
+  sha256_aarch64 = "13qpxa8nxsnikmm7h6ysnsdqg5vl8j7hzfa8kgh20z8a17fhj9kk";
   jceName = "jce_policy-8.zip";
   jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
   sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";
diff --git a/pkgs/development/compilers/orc/default.nix b/pkgs/development/compilers/orc/default.nix
index 525d2bb33a58..9fc9007abb9e 100644
--- a/pkgs/development/compilers/orc/default.nix
+++ b/pkgs/development/compilers/orc/default.nix
@@ -15,7 +15,8 @@ stdenv.mkDerivation rec {
     sed "/^toolsdir=/ctoolsdir=$dev/bin" -i "$dev"/lib/pkgconfig/orc*.pc
   '';
 
-  doCheck = true;
+  # https://bugzilla.gnome.org/show_bug.cgi?id=728129#c15
+  doCheck = stdenv.system != "i686-linux"; # not sure about cross-compiling
 
   meta = with stdenv.lib; {
     description = "The Oil Runtime Compiler";
diff --git a/pkgs/development/compilers/owl-lisp/default.nix b/pkgs/development/compilers/owl-lisp/default.nix
index b01914afc295..4e2f8b2af5b4 100644
--- a/pkgs/development/compilers/owl-lisp/default.nix
+++ b/pkgs/development/compilers/owl-lisp/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   doCheck = false;
 
   meta = with stdenv.lib; {
-    descripton  = "A functional lisp";
+    description = "A functional lisp";
     homepage    = https://github.com/aoh/owl-lisp;
     license     = licenses.mit;
     maintainers = with maintainers; [ peterhoeg ];
diff --git a/pkgs/development/compilers/purescript/psc-package/default.nix b/pkgs/development/compilers/purescript/psc-package/default.nix
index 8b2a0a0eb391..5e298dbf2cee 100644
--- a/pkgs/development/compilers/purescript/psc-package/default.nix
+++ b/pkgs/development/compilers/purescript/psc-package/default.nix
@@ -4,13 +4,13 @@ with lib;
 
 mkDerivation rec {
   pname = "psc-package";
-  version = "0.2.4";
+  version = "0.2.5";
 
   src = fetchFromGitHub {
     owner = "purescript";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0m1vcxa5zs4sqnnwgmxkhw1isdlmirp12yimn5345vwfvlxkc8kp";
+    sha256 = "15g0l8g8l6m5x4f73w68r9iav091x12b3wjxh0rx3ggnj093g6j1";
   };
 
   isLibrary = false;
diff --git a/pkgs/development/compilers/reason/default.nix b/pkgs/development/compilers/reason/default.nix
index 54d39d8fa631..649f4bc4582b 100644
--- a/pkgs/development/compilers/reason/default.nix
+++ b/pkgs/development/compilers/reason/default.nix
@@ -3,13 +3,13 @@
 
 buildOcaml rec {
   name = "reason";
-  version = "3.0.3";
+  version = "3.0.4";
 
   src = fetchFromGitHub {
     owner = "facebook";
     repo = "reason";
     rev = version;
-    sha256 = "19kp1cnxi6dq89xh07c14q7kzkawbxdkwrvn1rl48l78d04agnxx";
+    sha256 = "15qhx85him5rr4j0ygj3jh3qv9ijrn82ibr9scbn0qrnn43kj047";
   };
 
   propagatedBuildInputs = [ menhir merlin_extend ppx_tools_versioned ];
@@ -34,7 +34,7 @@ buildOcaml rec {
   '';
 
   meta = with stdenv.lib; {
-    homepage = https://facebook.github.io/reason/;
+    homepage = https://reasonml.github.io/;
     description = "Facebook's friendly syntax to OCaml";
     license = licenses.bsd3;
     maintainers = [ maintainers.volth ];
diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix
index da9680943b57..a707fe2e69e0 100644
--- a/pkgs/development/compilers/rust/bootstrap.nix
+++ b/pkgs/development/compilers/rust/bootstrap.nix
@@ -9,6 +9,7 @@ let
   hashes = {
     i686-unknown-linux-gnu = "abe592e06616cdc2fcca56ddbe482050dd49a1fada35e2af031c64fe6eb14668";
     x86_64-unknown-linux-gnu = "ca1cf3aed73ff03d065a7d3e57ecca92228d35dc36d9274a6597441319f18eb8";
+    aarch64-unknown-linux-gnu = "eaab3df489d4d8f976c4327d812b9870730eed6d0bbd52712767083d02be7472";
     i686-apple-darwin = "b3c2470f8f132d285e6c989681e251592b67071bc9d93cac8a2e6b66f7bdfcb5";
     x86_64-apple-darwin = "fa1fb8896d5e327cbe6deeb50e6e9a3346de629f2e6bcbd8c10f19f3e2ed67d5";
   };
@@ -18,6 +19,8 @@ let
     then "i686-unknown-linux-gnu"
     else if stdenv.system == "x86_64-linux"
     then "x86_64-unknown-linux-gnu"
+    else if stdenv.system == "aarch64-linux"
+    then "aarch64-unknown-linux-gnu"
     else if stdenv.system == "i686-darwin"
     then "i686-apple-darwin"
     else if stdenv.system == "x86_64-darwin"
diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix
index 3973eaff1878..76dafd953537 100644
--- a/pkgs/development/compilers/rust/default.nix
+++ b/pkgs/development/compilers/rust/default.nix
@@ -23,7 +23,9 @@ rec {
 
     patches = [
       ./patches/0001-Disable-fragile-tests-libstd-net-tcp-on-Darwin-Linux.patch
-    ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
+    ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch
+      # https://github.com/rust-lang/rust/issues/45410
+      ++ stdenv.lib.optional stdenv.isAarch64 ./patches/aarch64-disable-test_loading_cosine.patch;
 
   };
 
diff --git a/pkgs/development/compilers/rust/patches/aarch64-disable-test_loading_cosine.patch b/pkgs/development/compilers/rust/patches/aarch64-disable-test_loading_cosine.patch
new file mode 100644
index 000000000000..d29eb16cfe55
--- /dev/null
+++ b/pkgs/development/compilers/rust/patches/aarch64-disable-test_loading_cosine.patch
@@ -0,0 +1,12 @@
+diff --git a/src/librustc_back/dynamic_lib.rs b/src/librustc_back/dynamic_lib.rs
+index 1b42fa0..92256dc 100644
+--- a/src/librustc_back/dynamic_lib.rs
++++ b/src/librustc_back/dynamic_lib.rs
+@@ -80,6 +80,7 @@ mod tests {
+     use std::mem;
+ 
+     #[test]
++    #[ignore]
+     fn test_loading_cosine() {
+         if cfg!(windows) {
+             return
diff --git a/pkgs/development/compilers/rust/print-hashes.sh b/pkgs/development/compilers/rust/print-hashes.sh
index f3d094d65a8a..dc7e3719355c 100755
--- a/pkgs/development/compilers/rust/print-hashes.sh
+++ b/pkgs/development/compilers/rust/print-hashes.sh
@@ -10,6 +10,7 @@ set -euo pipefail
 PLATFORMS=(
   i686-unknown-linux-gnu
   x86_64-unknown-linux-gnu
+  aarch64-unknown-linux-gnu
   i686-apple-darwin
   x86_64-apple-darwin
 )
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix
index 4d92566edd4a..ec0f100fb568 100644
--- a/pkgs/development/compilers/rust/rustc.nix
+++ b/pkgs/development/compilers/rust/rustc.nix
@@ -34,6 +34,9 @@ stdenv.mkDerivation {
 
   __darwinAllowLocalNetworking = true;
 
+  # The build will fail at the very end on AArch64 without this.
+  dontUpdateAutotoolsGnuConfigScripts = if stdenv.isAarch64 then true else null;
+
   NIX_LDFLAGS = optionalString stdenv.isDarwin "-rpath ${llvmShared}/lib";
 
   # Enable nightly features in stable compiles (used for
diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index 9b7ce4120c48..b800d71198af 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchgit, writeText, sbclBootstrap
+{ stdenv, fetchurl, writeText, sbclBootstrap
 , sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
 , threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.system)
   # Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
@@ -9,16 +9,11 @@
 
 stdenv.mkDerivation rec {
   name    = "sbcl-${version}";
-  version = "1.4.1.0.20171104";
+  version = "1.4.2";
 
-  #src = fetchurl {
-  #  url    = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
-  #  sha256 = "1qdaf847g5p2zgq00ax5hdy4r82bl3ss382psd0kkca1h83cdiz8";
-  #};
-  src = fetchgit {
-    url    = "https://git.code.sf.net/p/sbcl/sbcl";
-    sha256 = "1fq34h8h8pax5q17w84kwv5amiaag3ikkq3cdmb31r64736mxi6r";
-    rev    = "11aa57d23bc464d6a6867a80e946907404ceadd1";
+  src = fetchurl {
+    url    = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
+    sha256 = "05s7wsx6bsnx4h6w3d8yim9apbvi8ih0glmvkmgjz7nrad4abjwd";
   };
 
   patchPhase = ''
diff --git a/pkgs/development/compilers/yosys/default.nix b/pkgs/development/compilers/yosys/default.nix
index b1c36f841a4b..117319c1ad5c 100644
--- a/pkgs/development/compilers/yosys/default.nix
+++ b/pkgs/development/compilers/yosys/default.nix
@@ -4,22 +4,22 @@
 
 stdenv.mkDerivation rec {
   name = "yosys-${version}";
-  version = "2017.11.05";
+  version = "2017.12.06";
 
   srcs = [
     (fetchFromGitHub {
-      owner = "cliffordwolf";
-      repo = "yosys";
-      rev = "4f31cb6daddedcee467d85797d81b79360ce1826";
-      sha256 = "1a5n0g5kpjsy8f99f64w81gkrr450wvffp407r1pddl8pmb0c3r7";
-      name = "yosys";
+      owner  = "cliffordwolf";
+      repo   = "yosys";
+      rev    = "8f2638ae2f12a48dcad14f24b0211c16ac724762";
+      sha256 = "0synbskclgn97hp28myvl0hp8pqp66awp37z4cv7zl154ipysfl1";
+      name   = "yosys";
     })
     (fetchFromBitbucket {
-      owner = "alanmi";
-      repo = "abc";
-      rev = "f6838749f234";
-      sha256 = "0n7ywvih958h1c4n7a398a9w3qikhkv885fx5j3y2a0xwqc86m4y";
-      name = "yosys-abc";
+      owner  = "alanmi";
+      repo   = "abc";
+      rev    = "31fc97b0aeed";
+      sha256 = "0ljmclr4hfh3iiyfw7ji0fm8j983la8021xfpnfd20dyc807hh65";
+      name   = "yosys-abc";
     })
   ];
   sourceRoot = "yosys";