summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2018-08-17 20:53:27 +0200
committerVladimír Čunát <vcunat@gmail.com>2018-08-17 20:53:27 +0200
commit14aa936ec52cc01c0b67470bf83b7b0b9aad6aef (patch)
treeb8b511e368df0c9583d41b9347673b3164a797dd /pkgs/development/compilers
parent6cb6ea1fed65bef4f2e9f02241a3e828c57fe57d (diff)
parent4ff7702082bad838e70140091afe7e77a9f00eca (diff)
downloadnixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.tar
nixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.tar.gz
nixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.tar.bz2
nixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.tar.lz
nixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.tar.xz
nixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.tar.zst
nixlib-14aa936ec52cc01c0b67470bf83b7b0b9aad6aef.zip
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/dmd/default.nix164
-rw-r--r--pkgs/development/compilers/ghc/8.4.3.nix10
-rw-r--r--pkgs/development/compilers/javacard-devkit/default.nix67
-rw-r--r--pkgs/development/compilers/ldc/default.nix134
-rw-r--r--pkgs/development/compilers/nextpnr/default.nix35
-rw-r--r--pkgs/development/compilers/pakcs/default.nix2
-rw-r--r--pkgs/development/compilers/rust/cargo.nix4
-rw-r--r--pkgs/development/compilers/rust/rustc.nix4
8 files changed, 234 insertions, 186 deletions
diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix
index b391b6eb8455..1e9e62efb636 100644
--- a/pkgs/development/compilers/dmd/default.nix
+++ b/pkgs/development/compilers/dmd/default.nix
@@ -1,34 +1,15 @@
-{ stdenv, fetchFromGitHub, overrideCC, gcc5
+{ stdenv, fetchFromGitHub
 , makeWrapper, unzip, which
 , curl, tzdata, gdb, darwin
-, callPackage, targetPackages
-, bootstrapVersion ? false
-, version ? "2.079.1"
-, dmdSha256 ? "0mlk095aw94d940qkymfp85daggiz3f0xv598nlc7acgp6408kyj"
-, druntimeSha256 ? "18r8gwvb54ar80j5155wx0qbqq4w56hqmbf6wap20xwijg2rw90g"
-, phobosSha256 ? "1x5v1ln51nr8x2vyki864160bakdyq0acmvbfv7jcipaj2w3m9bb"
+, callPackage, targetPackages, ldc
+, version ? "2.081.1"
+, dmdSha256 ? "1xdz7p0pdzwkn57ai93mavgdkd8xb1sr2brlc6y3c12x84h43s8z"
+, druntimeSha256 ? "1vl8ag6rjvqqmc5bn5jk3yfynjb9ggy3hw1awwl7c76bq4f7nbif"
+, phobosSha256 ? "0h1jdc3yai1l42bxjdlyi9hf9qadh76v925rjk2q4ibv2fzl56b7"
 }:
 
 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;
@@ -74,11 +55,6 @@ let
     usePIC = "-fPIC";
     ROOT_HOME_DIR = "$(echo ~root)";
 
-    datetimePath = if bootstrapVersion then
-      "phobos/std/datetime.d"
-    else
-      "phobos/std/datetime/timezone.d";
-
     phobosPatches = ''
         # Ugly hack so the dlopen call has a chance to succeed.
         # https://issues.dlang.org/show_bug.cgi?id=15391
@@ -89,77 +65,24 @@ let
         substituteInPlace phobos/posix.mak \
             --replace "-soname=libcurl.so.4" "-soname=${curl.out}/lib/libcurl.so.4"
 
-    ''
-
-    + stdenv.lib.optionalString (!bootstrapVersion) ''
-	# Can be removed when https://github.com/dlang/phobos/pull/6224 is included.
-        substituteInPlace ${datetimePath} \
-            --replace "foreach (DirEntry de; dirEntries(tzDatabaseDir, SpanMode.depth))" "import std.path : baseName; foreach (DirEntry de; dirEntries(tzDatabaseDir, SpanMode.depth))"
-
-        substituteInPlace ${datetimePath} \
-            --replace "tzName == \"leapseconds\"" "baseName(tzName) == \"leapseconds\""
-    ''
-
-    + 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\""
-
-        # 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/
-    ''
-
-    + stdenv.lib.optionalString (bootstrapVersion && stdenv.hostPlatform.isLinux) ''
-        # See https://github.com/dlang/phobos/pull/5960
-        substituteInPlace phobos/std/path.d \
-            --replace "\"/root" "\"${ROOT_HOME_DIR}"
     '';
 
-    dmdPath = if bootstrapVersion then
-      "dmd/src"
-    else
-      "dmd";
-
     postPatch = ''
-    ''
-
-    + stdenv.lib.optionalString (!bootstrapVersion) ''
         substituteInPlace druntime/test/common.mak \
             --replace "DFLAGS:=" "DFLAGS:=${usePIC} "
-    ''
 
-    + stdenv.lib.optionalString (bootstrapVersion) ''
-        # Use proper C++ compiler
-        substituteInPlace ${dmdPath}/posix.mak \
-            --replace g++ $CXX
+        substituteInPlace dmd/src/posix.mak \
+            --replace "DFLAGS :=" "DFLAGS += -link-defaultlib-shared=false"
     ''
 
     + phobosPatches
 
-    + stdenv.lib.optionalString (stdenv.hostPlatform.isLinux && bootstrapVersion) ''
-      substituteInPlace ${dmdPath}/root/port.c \
-        --replace "#include <bits/mathdef.h>" "#include <complex.h>"
-
-      substituteInPlace ${dmdPath}/root/port.c \
-        --replace "#include <bits/nan.h>" "#include <math.h>"
-    ''
-
     + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
-        substituteInPlace ${dmdPath}/posix.mak \
+        substituteInPlace dmd/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 ]
+    nativeBuildInputs = [ ldc makeWrapper unzip which gdb ]
 
     ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
       Foundation
@@ -173,23 +96,22 @@ let
     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";
+    pathToDmd = "${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
+        make -j$NIX_BUILD_CORES -f posix.mak INSTALL_DIR=$out BUILD=release ENABLE_RELEASE=1 PIC=1 HOST_DMD=ldmd2
         cd ../druntime
-        make -j$NIX_BUILD_CORES -f posix.mak PIC=1 INSTALL_DIR=$out DMD=${pathToDmd}
+        make -j$NIX_BUILD_CORES -f posix.mak BUILD=release ENABLE_RELEASE=1 PIC=1 INSTALL_DIR=$out DMD=${pathToDmd}
         cd ../phobos
-        make -j$NIX_BUILD_CORES -f posix.mak PIC=1 INSTALL_DIR=$out DMD=${pathToDmd} TZ_DATABASE_DIR=${tzdata}/share/zoneinfo/
+        make -j$NIX_BUILD_CORES -f posix.mak BUILD=release ENABLE_RELEASE=1 PIC=1 INSTALL_DIR=$out DMD=${pathToDmd} TZ_DATABASE_DIR=${tzdata}/share/zoneinfo/
         cd ..
     '';
 
-    doCheck = !bootstrapVersion;
+    # Disable tests on Darwin for now because of
+    # https://github.com/NixOS/nixpkgs/issues/41099
+    doCheck = !stdenv.hostPlatform.isDarwin;
 
     checkPhase = ''
         cd dmd
@@ -198,9 +120,9 @@ let
         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}";
 
+    extension = if stdenv.hostPlatform.isDarwin then "a" else "{a,so}";
+    
     dontStrip = true;
 
     installPhase = ''
@@ -250,34 +172,40 @@ let
 
   # 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;
+  #
+  # Disable tests on Darwin for now because of
+  # https://github.com/NixOS/nixpkgs/issues/41099
+  phobosUnittests = if !stdenv.hostPlatform.isDarwin then
+    stdenv.mkDerivation rec {
+      name = "phobosUnittests-${version}";
+      version = dmdBuild.version;
 
-    enableParallelBuilding = dmdBuild.enableParallelBuilding;
-    preferLocalBuild = true;
-    inputString = dmdBuild.outPath;
-    outputHashAlgo = "sha256";
-    outputHash = builtins.hashString "sha256" inputString;
+      enableParallelBuilding = dmdBuild.enableParallelBuilding;
+      preferLocalBuild = true;
+      inputString = dmdBuild.outPath;
+      outputHashAlgo = "sha256";
+      outputHash = builtins.hashString "sha256" inputString;
 
-    srcs = dmdBuild.srcs;
+      srcs = dmdBuild.srcs;
 
-    sourceRoot = ".";
+      sourceRoot = ".";
 
-    postPatch = dmdBuild.phobosPatches;
+      postPatch = dmdBuild.phobosPatches;
 
-    nativeBuildInputs = dmdBuild.nativeBuildInputs;
-    buildInputs = dmdBuild.buildInputs;
+      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 TZ_DATABASE_DIR=${tzdata}/share/zoneinfo/
-    '';
+      buildPhase = ''
+          cd phobos
+          make -j$NIX_BUILD_CORES -f posix.mak unittest BUILD=release ENABLE_RELEASE=1 PIC=1 DMD=${dmdBuild}/bin/dmd TZ_DATABASE_DIR=${tzdata}/share/zoneinfo/
+      '';
 
-    installPhase = ''
-        echo -n $inputString > $out
-    '';
-  };
+      installPhase = ''
+          echo -n $inputString > $out
+      '';
+    }
+  else
+    "";
 
 in
 
diff --git a/pkgs/development/compilers/ghc/8.4.3.nix b/pkgs/development/compilers/ghc/8.4.3.nix
index 7be209aa5fac..3f1f539cab78 100644
--- a/pkgs/development/compilers/ghc/8.4.3.nix
+++ b/pkgs/development/compilers/ghc/8.4.3.nix
@@ -30,6 +30,10 @@
 , # What flavour to build. An empty string indicates no
   # specific flavour and falls back to ghc default values.
   ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
+, # Whether to backport https://phabricator.haskell.org/D4388 for
+  # deterministic profiling symbol names, at the cost of a slightly
+  # non-standard GHC API
+  deterministicProfiling ? false
 }:
 
 assert !enableIntegerSimple -> gmp != null;
@@ -94,7 +98,11 @@ stdenv.mkDerivation (rec {
     sha256 = "0plzsbfaq6vb1023lsarrjglwgr9chld4q3m99rcfzx0yx5mibp3";
     extraPrefix = "utils/hsc2hs/";
     stripLen = 1;
-  })]
+  })] ++ stdenv.lib.optional deterministicProfiling
+    (fetchpatch {
+      url = "https://phabricator-files.haskell.org/file/data/yd2fclrwulila2quki5q/PHID-FILE-lr2j63hkglwauprxycrt/D4388.diff";
+      sha256 = "0w6sdcvnqjlnlzpvnzw20b80v150ijjyjvs9548ildc1928j0w7s";
+    })
     ++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch;
 
   postPatch = "patchShebangs .";
diff --git a/pkgs/development/compilers/javacard-devkit/default.nix b/pkgs/development/compilers/javacard-devkit/default.nix
new file mode 100644
index 000000000000..215b2e6db7d7
--- /dev/null
+++ b/pkgs/development/compilers/javacard-devkit/default.nix
@@ -0,0 +1,67 @@
+{ stdenv, requireFile, unzip, makeWrapper, oraclejdk8, autoPatchelfHook
+, pcsclite
+}:
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "javacard-devkit";
+  version = "2.2.2";
+  uscoreVersion = builtins.replaceStrings ["."] ["_"] version;
+
+  src = requireFile {
+    name = "java_card_kit-${uscoreVersion}-linux.zip";
+    url = "http://www.oracle.com/technetwork/java/javasebusiness/downloads/"
+        + "java-archive-downloads-javame-419430.html#java_card_kit-2.2.2-oth-JPR";
+    sha256 = "1rzkw8izqq73ifvyp937wnjjc40a40drc4zsm0l1s6jyv3d7agb2";
+  };
+
+  nativeBuildInputs = [ unzip oraclejdk8 makeWrapper autoPatchelfHook ];
+  buildInputs = [ pcsclite ];
+
+  zipPrefix = "java_card_kit-${uscoreVersion}";
+
+  sourceRoot = ".";
+  unpackCmd = ''
+    unzip -p "$curSrc" "$zipPrefix/$zipPrefix-rr-bin-linux-do.zip" | jar x
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/share/$pname"
+    cp -rt "$out/share/$pname" api_export_files
+    cp -rt "$out" lib
+
+    for i in bin/*; do
+      case "$i" in
+        *.so) install -vD "$i" "$out/libexec/$pname/$(basename "$i")";;
+        *) target="$out/bin/$(basename "$i")"
+           install -vD "$i" "$target"
+           wrapProgram "$target" \
+             --set JAVA_HOME "$JAVA_HOME" \
+             --prefix CLASSPATH : "$out/share/$pname/api_export_files"
+           ;;
+      esac
+    done
+
+    makeWrapper "$JAVA_HOME/bin/javac" "$out/bin/javacardc" \
+      --prefix CLASSPATH : "$out/lib/api.jar"
+  '';
+
+  meta = {
+    description = "Official development kit by Oracle for programming for the Java Card platform";
+    longDescription = ''
+      This Java Card SDK is the official SDK made available by Oracle for programming for the Java Card platform.
+
+      Instructions for usage:
+
+      First, compile your '.java' (NixOS-specific: you should not need to set the class path -- if you need, it's a bug):
+          javacardc -source 1.5 -target 1.5 [MyJavaFile].java
+      Then, convert the '.class' file into a '.cap':
+          converter -applet [AppletAID] [MyApplet] [myPackage] [PackageAID] [Version]
+      For more details, please refer to the documentation by Oracle
+    '';
+    homepage = http://www.oracle.com/technetwork/java/embedded/javacard/overview/index.html;
+    license = stdenv.lib.licenses.unfree;
+    maintainers = [ stdenv.lib.maintainers.ekleog ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/development/compilers/ldc/default.nix b/pkgs/development/compilers/ldc/default.nix
index dc6a933a9345..bb3649302187 100644
--- a/pkgs/development/compilers/ldc/default.nix
+++ b/pkgs/development/compilers/ldc/default.nix
@@ -2,8 +2,8 @@
 , python, libconfig, lit, gdb, unzip, darwin, bash
 , callPackage, makeWrapper, targetPackages
 , bootstrapVersion ? false
-, version ? "1.8.0"
-, ldcSha256 ? "0zswjlibj8zcdj06nn09jjhbd99chsa5f4kps8xifzgrpgsa28g4"
+, version ? "1.10.0"
+, ldcSha256 ? "0wc3vlblsz4qdwa9ay9plv9nvfd07zj2byqqffaa4a5gvjwf5dlr"
 }:
 
 let
@@ -155,7 +155,10 @@ let
 
     makeFlags = [ "DMD=$DMD" ];
 
-    doCheck = true;
+    # Disable tests on Darwin for now because of
+    # https://github.com/NixOS/nixpkgs/issues/41099
+    # https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
+    doCheck = !bootstrapVersion && !stdenv.hostPlatform.isDarwin;
 
     checkPhase = ''
       # Build and run LDC D unittests.
@@ -184,65 +187,72 @@ let
 
   # 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;
-
-    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"
-                        "-DD_COMPILER=${ldcBuild.out}/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.out}/bin/ldc2 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}
-        ln -s ${ldcBuild.out}/bin/ldmd2 $PWD/bin/ldmd2
-        ${testCmd}
-    '';
-
-    installPhase = ''
-        echo -n $inputString > $out
-    '';
-  };
+  #
+  # Disable tests on Darwin for now because of
+  # https://github.com/NixOS/nixpkgs/issues/41099
+  # https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
+  ldcUnittests = if (!bootstrapVersion && !stdenv.hostPlatform.isDarwin) then
+    stdenv.mkDerivation rec {
+      name = "ldcUnittests-${version}";
+
+      enableParallelBuilding = ldcBuild.enableParallelBuilding;
+      preferLocalBuild = true;
+      inputString = ldcBuild.outPath;
+      outputHashAlgo = "sha256";
+      outputHash = builtins.hashString "sha256" inputString;
+
+      src = ldcBuild.src;
+
+      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"
+                          "-DD_COMPILER=${ldcBuild.out}/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.out}/bin/ldc2 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}
+          ln -s ${ldcBuild.out}/bin/ldmd2 $PWD/bin/ldmd2
+          ${testCmd}
+      '';
+
+      installPhase = ''
+          echo -n $inputString > $out
+      '';
+    }
+  else
+    "";
 
 in
 
diff --git a/pkgs/development/compilers/nextpnr/default.nix b/pkgs/development/compilers/nextpnr/default.nix
new file mode 100644
index 000000000000..5ec3b5f59d88
--- /dev/null
+++ b/pkgs/development/compilers/nextpnr/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, cmake
+, icestorm, python3, boost, qtbase
+}:
+
+let
+  boostPython = boost.override { python = python3; enablePython = true; };
+in
+stdenv.mkDerivation rec {
+  name = "nextpnr-${version}";
+  version = "2018.08.09";
+
+  src = fetchFromGitHub {
+    owner  = "yosyshq";
+    repo   = "nextpnr";
+    rev    = "2e02f2d6166c75b1fcec73d268e97e407071a372";
+    sha256 = "1f98mkailn75gz5fvhjhnyr0gwa0r8mm3f2sbvgl0yvys8qi08wr";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boostPython python3 qtbase ];
+
+  enableParallelBuilding = true;
+  cmakeFlags =
+    [ "-DARCH=generic;ice40"
+      "-DICEBOX_ROOT=${icestorm}/share/icebox"
+    ];
+
+  meta = with stdenv.lib; {
+    description = "Place and route tool for FPGAs";
+    homepage    = https://github.com/yosyshq/nextpnr;
+    license     = licenses.isc;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}
diff --git a/pkgs/development/compilers/pakcs/default.nix b/pkgs/development/compilers/pakcs/default.nix
index 52639667745a..412864cd1600 100644
--- a/pkgs/development/compilers/pakcs/default.nix
+++ b/pkgs/development/compilers/pakcs/default.nix
@@ -8,7 +8,7 @@ let
 
   src = fetchurl {
     url = "https://www.informatik.uni-kiel.de/~pakcs/download/${name}-src.tar.gz";
-    sha256 = "0fdzw2zz5vs6z20jn6a8jfvpr6dp7fs1rr01cy0xjnzg2mgmn42a";
+    sha256 = "086nbsfv363cwrfxzhs54ggdwwkh1ms0pn0v1a4lvqlksjm7jdhv";
   };
 
   curry-frontend = (haskellPackages.override {
diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix
index 2ff3257c7fb7..34932c911ebc 100644
--- a/pkgs/development/compilers/rust/cargo.nix
+++ b/pkgs/development/compilers/rust/cargo.nix
@@ -19,8 +19,8 @@ rustPlatform.buildRustPackage rec {
 
   passthru.rustc = rustc;
 
-  # changes hash of vendor directory otherwise on aarch64
-  dontUpdateAutotoolsGnuConfigScripts = if stdenv.isAarch64 then "1" else null;
+  # changes hash of vendor directory otherwise
+  dontUpdateAutotoolsGnuConfigScripts = true;
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ cacert file curl python openssl cmake zlib makeWrapper libgit2 ]
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix
index f3f9e2f57b72..23aa750060a3 100644
--- a/pkgs/development/compilers/rust/rustc.nix
+++ b/pkgs/development/compilers/rust/rustc.nix
@@ -32,8 +32,8 @@ stdenv.mkDerivation {
 
   __darwinAllowLocalNetworking = true;
 
-  # The build will fail at the very end on AArch64 without this.
-  dontUpdateAutotoolsGnuConfigScripts = if stdenv.isAarch64 then true else null;
+  # rustc complains about modified source files otherwise
+  dontUpdateAutotoolsGnuConfigScripts = true;
 
   # Running the default `strip -S` command on Darwin corrupts the
   # .rlib files in "lib/".