summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/gcc/6/darwin-const-correct.patch25
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix9
-rw-r--r--pkgs/development/compilers/haxe/default.nix98
-rw-r--r--pkgs/development/compilers/haxe/hxcpp.nix52
-rw-r--r--pkgs/development/compilers/haxe/setup-hook.sh2
-rw-r--r--pkgs/development/compilers/neko/default.nix6
-rw-r--r--pkgs/development/compilers/wla-dx/default.nix7
7 files changed, 86 insertions, 113 deletions
diff --git a/pkgs/development/compilers/gcc/6/darwin-const-correct.patch b/pkgs/development/compilers/gcc/6/darwin-const-correct.patch
deleted file mode 100644
index a9b9b85acab..00000000000
--- a/pkgs/development/compilers/gcc/6/darwin-const-correct.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 5972cd58bde3bc8bacfe994e5b127c411241f255 Mon Sep 17 00:00:00 2001
-From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 3 Jan 2017 05:36:40 +0000
-Subject: [PATCH] 	* config/darwin-driver.c (darwin_driver_init):
- Const-correctness 	fixes for first_period and second_period variables.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244010 138bc75d-0d04-0410-961f-82ee72b054a4
----
-diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c
-index 0c4f0cd..e3ed79d 100644
---- a/gcc/config/darwin-driver.c
-+++ b/gcc/config/darwin-driver.c
-@@ -299,10 +299,10 @@ darwin_driver_init (unsigned int *decoded_options_count,
-   if (vers_string != NULL)
-     {
-       char *asm_major = NULL;
--      char *first_period = strchr(vers_string, '.');
-+      const char *first_period = strchr(vers_string, '.');
-       if (first_period != NULL)
- 	{
--	  char *second_period = strchr(first_period+1, '.');
-+	  const char *second_period = strchr(first_period+1, '.');
- 	  if (second_period  != NULL)
- 	    asm_major = xstrndup (vers_string, second_period-vers_string);
- 	  else
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index c439703fa8e..b091fd1ae37 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -58,7 +58,7 @@ assert langGo -> langCC;
 with stdenv.lib;
 with builtins;
 
-let version = "6.3.0";
+let version = "6.4.0";
 
     # Whether building a cross-compiler for GNU/Hurd.
     crossGNU = targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu";
@@ -72,8 +72,7 @@ let version = "6.3.0";
       # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
       # target libraries and tools.
       ++ optional langAda ../gnat-cflags.patch
-      ++ optional langFortran ../gfortran-driving.patch
-      ++ optional hostPlatform.isDarwin ./darwin-const-correct.patch; # Kill this after 6.3.0
+      ++ optional langFortran ../gfortran-driving.patch;
 
     javaEcj = fetchurl {
       # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
@@ -213,8 +212,8 @@ stdenv.mkDerivation ({
   builder = ../builder.sh;
 
   src = fetchurl {
-    url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
-    sha256 = "17xjz30jb65hcf714vn9gcxvrrji8j20xm7n33qg1ywhyzryfsph";
+    url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz";
+    sha256 = "1m0lr7938lw5d773dkvwld90hjlcq2282517d1gwvrfzmwgg42w5";
   };
 
   inherit patches;
diff --git a/pkgs/development/compilers/haxe/default.nix b/pkgs/development/compilers/haxe/default.nix
index 684c6d25daa..ca41545eb45 100644
--- a/pkgs/development/compilers/haxe/default.nix
+++ b/pkgs/development/compilers/haxe/default.nix
@@ -1,40 +1,82 @@
-{ stdenv, fetchgit, ocaml, zlib, pcre, neko, camlp4 }:
+{ stdenv, fetchgit, bash, coreutils, ocaml, zlib, pcre, neko, camlp4 }:
 
-stdenv.mkDerivation {
-  name = "haxe-3.4.2";
+let
+  generic = { version, sha256, prePatch }:
+    stdenv.mkDerivation rec {
+      name = "haxe-${version}";
 
-  buildInputs = [ocaml zlib pcre neko camlp4];
+      buildInputs = [ocaml zlib pcre neko camlp4];
 
-  src = fetchgit {
-    url = "https://github.com/HaxeFoundation/haxe.git";
-    sha256 = "1m5fp183agqv8h3ynhxw4kndkpq2d6arysmirv3zl3vz5crmpwqd";
-    fetchSubmodules = true;
+      src = fetchgit {
+        url = https://github.com/HaxeFoundation/haxe.git;
+        inherit sha256;
+        fetchSubmodules = true;
+        rev = "refs/tags/${version}";
+      };
 
-    # Tag 3.4.2
-    rev = "890f8c70cf23ce6f9fe0fdd0ee514a9699433ca7";
-  };
+      inherit prePatch;
+
+      buildFlags = [ "all" "tools" ];
 
-  prePatch = ''
-    sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' src/main.ml
-  '';
+      installPhase = ''
+        install -vd "$out/bin" "$out/lib/haxe/std"
+        cp -vr haxe haxelib std "$out/lib/haxe"
 
-  buildFlags = [ "all" "tools" ];
+        # make wrappers which provide a temporary HAXELIB_PATH with symlinks to multiple repositories HAXELIB_PATH may point to
+        for name in haxe haxelib; do
+        cat > $out/bin/$name <<EOF
+        #!{bash}/bin/bash
 
-  installPhase = ''
-    install -vd "$out/bin" "$out/lib/haxe/std"
-    install -vt "$out/bin" haxe haxelib
-    cp -vr std "$out/lib/haxe"
-  '';
+        if [[ "\$HAXELIB_PATH" =~ : ]]; then
+          NEW_HAXELIB_PATH="\$(${coreutils}/bin/mktemp -d)"
 
-  setupHook = ./setup-hook.sh;
+          IFS=':' read -ra libs <<< "\$HAXELIB_PATH"
+          for libdir in "\''${libs[@]}"; do
+            for lib in "\$libdir"/*; do
+              if [ ! -e "\$NEW_HAXELIB_PATH/\$(${coreutils}/bin/basename "\$lib")" ]; then
+                ${coreutils}/bin/ln -s "--target-directory=\$NEW_HAXELIB_PATH" "\$lib"
+              fi
+            done
+          done
+          export HAXELIB_PATH="\$NEW_HAXELIB_PATH"
+          $out/lib/haxe/$name "\$@"
+          rm -rf "\$NEW_HAXELIB_PATH"
+        else
+          exec $out/lib/haxe/$name "\$@"
+        fi
+        EOF
+        chmod +x $out/bin/$name
+        done
+      '';
 
-  dontStrip = true;
+      setupHook = ./setup-hook.sh;
 
-  meta = with stdenv.lib; {
-    description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
-    homepage = https://haxe.org;
-    license = with licenses; [ gpl2 bsd2 /*?*/ ];  # -> docs/license.txt
-    maintainers = [ maintainers.marcweber ];
-    platforms = platforms.linux ++ platforms.darwin;
+      dontStrip = true;
+
+      meta = with stdenv.lib; {
+        description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
+        homepage = https://haxe.org;
+        license = with licenses; [ gpl2 bsd2 /*?*/ ];  # -> docs/license.txt
+        maintainers = [ maintainers.marcweber ];
+        platforms = platforms.linux ++ platforms.darwin;
+      };
+    };
+in {
+  # this old version is required to compile some libraries
+  haxe_3_2 = generic {
+    version = "3.2.1";
+    sha256 = "1x9ay5a2llq46fww3k07jxx8h1vfpyxb522snc6702a050ki5vz3";
+    prePatch = ''
+      sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' main.ml
+      sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/tools/haxelib/Main.hx
+    '';
+  };
+  haxe_3_4 = generic {
+    version = "3.4.2";
+    sha256 = "1m5fp183agqv8h3ynhxw4kndkpq2d6arysmirv3zl3vz5crmpwqd";
+    prePatch = ''
+      sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' src/main.ml
+      sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/haxelib/client/Main.hx
+    '';
   };
 }
diff --git a/pkgs/development/compilers/haxe/hxcpp.nix b/pkgs/development/compilers/haxe/hxcpp.nix
deleted file mode 100644
index 56b43fc128e..00000000000
--- a/pkgs/development/compilers/haxe/hxcpp.nix
+++ /dev/null
@@ -1,52 +0,0 @@
-{ stdenv, fetchzip, haxe, neko, pcre, sqlite, zlib }:
-
-stdenv.mkDerivation rec {
-  name = "hxcpp-3.2.27";
-
-  src = let
-    zipFile = stdenv.lib.replaceChars ["."] [","] name;
-  in fetchzip {
-    inherit name;
-    url = "http://lib.haxe.org/files/3.0/${zipFile}.zip";
-    sha256 = "1hw4kr1f8q7f4fkzis7kvkm7h1cxhv6cf5v1iq7rvxs2fxiys7fr";
-  };
-
-  NIX_LDFLAGS = "-lpcre -lz -lsqlite3";
-
-  outputs = [ "out" "lib" ];
-
-  patchPhase = ''
-    rm -rf bin lib project/thirdparty project/libs/sqlite/sqlite3.[ch]
-    find . -name '*.n' -delete
-    sed -i -re '/(PCRE|ZLIB)_DIR|\<sqlite3\.c\>/d' project/Build.xml
-    sed -i -e 's/mFromFile = "@";/mFromFile = "";/' tools/hxcpp/Linker.hx
-    sed -i -e '/dll_ext/s,HX_CSTRING("./"),HX_CSTRING("'"$lib"'/"),' \
-      src/hx/Lib.cpp
-  '';
-
-  buildInputs = [ haxe neko pcre sqlite zlib ];
-
-  targetArch = "linux-m${if stdenv.is64bit then "64" else "32"}";
-
-  buildPhase = ''
-    haxe -neko project/build.n -cp tools/build -main Build
-    haxe -neko run.n -cp tools/run -main RunMain
-    haxe -neko hxcpp.n -cp tools/hxcpp -main BuildTool
-    (cd project && neko build.n "ndll-$targetArch")
-  '';
-
-  installPhase = ''
-    for i in bin/Linux*/*.dso; do
-      install -vD "$i" "$lib/$(basename "$i")"
-    done
-    find *.n toolchain/*.xml build-tool/BuildCommon.xml src include \
-      -type f -exec install -vD -m 0644 {} "$out/lib/haxe/hxcpp/{}" \;
-  '';
-
-  meta = {
-    homepage = "http://lib.haxe.org/p/hxcpp";
-    description = "Runtime support library for the Haxe C++ backend";
-    license = stdenv.lib.licenses.bsd2;
-    platforms = stdenv.lib.platforms.linux;
-  };
-}
diff --git a/pkgs/development/compilers/haxe/setup-hook.sh b/pkgs/development/compilers/haxe/setup-hook.sh
index a29e04a989b..21cc0206859 100644
--- a/pkgs/development/compilers/haxe/setup-hook.sh
+++ b/pkgs/development/compilers/haxe/setup-hook.sh
@@ -1,5 +1,7 @@
 addHaxeLibPath() {
+  if [ ! -d "$1/lib/haxe/std" ]; then
     addToSearchPath HAXELIB_PATH "$1/lib/haxe"
+  fi
 }
 
 envHooks+=(addHaxeLibPath)
diff --git a/pkgs/development/compilers/neko/default.nix b/pkgs/development/compilers/neko/default.nix
index 493748d369b..e90f3af704d 100644
--- a/pkgs/development/compilers/neko/default.nix
+++ b/pkgs/development/compilers/neko/default.nix
@@ -24,6 +24,12 @@ stdenv.mkDerivation rec {
           + "fe87462d9c7a6ee27e28f5be5e4fc0ac87b34574.patch";
       sha256 = "1jbmq6j32vg3qv20dbh82cp54886lgrh7gkcqins8a2y4l4dl3sc";
     })
+    # https://github.com/HaxeFoundation/neko/pull/165
+    (fetchpatch {
+      url = "https://github.com/HaxeFoundation/neko/commit/"
+          + "c6d9c6d796200990b3b6a53a4dc716c9192398e6.patch";
+      sha256 = "1pq0qhhb9gbhc3zbgylwp0amhwsz0q0ggpj6v2xgv0hfy7d63rcd";
+    })
   ];
 
   buildInputs =
diff --git a/pkgs/development/compilers/wla-dx/default.nix b/pkgs/development/compilers/wla-dx/default.nix
index 13a48aaaa30..2ea2faa3e09 100644
--- a/pkgs/development/compilers/wla-dx/default.nix
+++ b/pkgs/development/compilers/wla-dx/default.nix
@@ -1,13 +1,14 @@
 {stdenv, fetchFromGitHub, cmake}:
 
 stdenv.mkDerivation rec {
-  name = "wla-dx-git-2016-02-27";
+  version = "2017-06-05";
+  name = "wla-dx-git-${version}";
 
   src = fetchFromGitHub {
     owner = "vhelin";
     repo = "wla-dx";
-    rev = "8189fe8d5620584ea16563875ff3c5430527c86a";
-    sha256 = "02zgkcyfx7y8j6jvyi12lm29fydnd7m3rxv6g2psv23fyzmpkkir";
+    rev = "ae6843f9711cbc2fa6dd8c200877b40bd2bcad7f";
+    sha256 = "09c2kz12ld97ad41j6r8r65jknllrak1x8r43fgr26x7hdlxz5c6";
   };
 
   hardeningDisable = [ "format" ];