summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorLuca Bruno <lethalman88@gmail.com>2015-12-11 18:31:00 +0100
committerLuca Bruno <lethalman88@gmail.com>2015-12-11 18:31:00 +0100
commit5b0352a6a43fdd924a53cde4b81c15b755fa0a27 (patch)
treecf0fcc2be2f6d08c970f0322a63ff0a31d5d5dee /pkgs/development/compilers
parent2f0fe05543ce594eacf0310966914d6e19a42f88 (diff)
parent146784f835a6cadc65812c5adf76533c18e5be61 (diff)
downloadnixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.tar
nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.tar.gz
nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.tar.bz2
nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.tar.lz
nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.tar.xz
nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.tar.zst
nixlib-5b0352a6a43fdd924a53cde4b81c15b755fa0a27.zip
Merge branch 'master' into closure-size
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/closure/default.nix2
-rw-r--r--pkgs/development/compilers/dmd/default.nix6
-rw-r--r--pkgs/development/compilers/gcc/4.8/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/4.9/default.nix4
-rw-r--r--pkgs/development/compilers/ghc/7.10.3.nix70
-rw-r--r--pkgs/development/compilers/go/1.5.nix4
-rw-r--r--pkgs/development/compilers/jsonnet/default.nix35
-rw-r--r--pkgs/development/compilers/kotlin/default.nix39
-rw-r--r--pkgs/development/compilers/llvm/3.7/llvm.nix6
-rw-r--r--pkgs/development/compilers/nim/default.nix2
-rw-r--r--pkgs/development/compilers/rustc/generic.nix13
-rw-r--r--pkgs/development/compilers/rustc/head.nix6
-rw-r--r--pkgs/development/compilers/sbcl/bootstrap.nix1
-rw-r--r--pkgs/development/compilers/sbcl/default.nix6
-rw-r--r--pkgs/development/compilers/scala/2.10.nix3
-rw-r--r--pkgs/development/compilers/scala/default.nix3
16 files changed, 178 insertions, 24 deletions
diff --git a/pkgs/development/compilers/closure/default.nix b/pkgs/development/compilers/closure/default.nix
index e94cbeae37f4..1c684c21bf40 100644
--- a/pkgs/development/compilers/closure/default.nix
+++ b/pkgs/development/compilers/closure/default.nix
@@ -26,6 +26,6 @@ stdenv.mkDerivation rec {
     description = "A tool for making JavaScript download and run faster";
     homepage = https://developers.google.com/closure/compiler/;
     license = stdenv.lib.licenses.asl20;
-    platforms = stdenv.lib.platforms.linux;
+    platforms = stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix
index 8b0f2509a911..1cd894372bb9 100644
--- a/pkgs/development/compilers/dmd/default.nix
+++ b/pkgs/development/compilers/dmd/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, unzip, curl }:
+{ stdenv, fetchurl, unzip, curl, makeWrapper, gcc }:
 
 stdenv.mkDerivation {
   name = "dmd-2.067.1";
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
     sha256 = "0ny99vfllvvgcl79pwisxcdnb3732i827k9zg8c0j4s0n79k5z94";
   };
 
-  buildInputs = [ unzip curl ];
+  buildInputs = [ unzip curl makeWrapper ];
 
   # Allow to use "clang++", commented in Makefile
   postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
@@ -48,6 +48,8 @@ stdenv.mkDerivation {
       cp -r std $out/include/d2
       cp -r etc $out/include/d2
 
+      wrapProgram $out/bin/dmd --prefix PATH ":" "${gcc}/bin/"
+
       cd $out/bin
       tee dmd.conf << EOF
       [Environment]
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix
index a90d9e7c8ec4..09e3751580c5 100644
--- a/pkgs/development/compilers/gcc/4.8/default.nix
+++ b/pkgs/development/compilers/gcc/4.8/default.nix
@@ -298,7 +298,6 @@ stdenv.mkDerivation ({
     ++ (optional stdenv.isDarwin gnused)
     ;
 
-  NIX_LDFLAGS = stdenv.lib.optionalString  stdenv.isSunOS "-lm -ldl";
 
   preConfigure = stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit) ''
     export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g`
@@ -523,6 +522,7 @@ stdenv.mkDerivation ({
     platforms =
       stdenv.lib.platforms.linux ++
       stdenv.lib.platforms.freebsd ++
+      stdenv.lib.platforms.illumos ++
       optionals (langAda == false) stdenv.lib.platforms.darwin;
   };
 }
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix
index 07dca989c9ba..2b87c8ac4306 100644
--- a/pkgs/development/compilers/gcc/4.9/default.nix
+++ b/pkgs/development/compilers/gcc/4.9/default.nix
@@ -297,9 +297,8 @@ stdenv.mkDerivation ({
     ++ (optional stdenv.isDarwin gnused)
     ;
 
-  NIX_LDFLAGS = stdenv.lib.optionalString  stdenv.isSunOS "-lm -ldl";
-
   preConfigure = stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit) ''
+    sed -i -e "s/-lrt//g" libstdc++-v3/configure
     export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g`
     export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET"
     export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
@@ -522,6 +521,7 @@ stdenv.mkDerivation ({
     platforms =
       stdenv.lib.platforms.linux ++
       stdenv.lib.platforms.freebsd ++
+      stdenv.lib.platforms.illumos ++
       optionals (langAda == false) stdenv.lib.platforms.darwin;
   };
 }
diff --git a/pkgs/development/compilers/ghc/7.10.3.nix b/pkgs/development/compilers/ghc/7.10.3.nix
new file mode 100644
index 000000000000..32d6b72970cb
--- /dev/null
+++ b/pkgs/development/compilers/ghc/7.10.3.nix
@@ -0,0 +1,70 @@
+{ stdenv, fetchurl, fetchpatch, ghc, perl, gmp, ncurses, libiconv, binutils, coreutils
+, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, hscolour
+}:
+
+let
+
+  buildMK = ''
+    libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
+    libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
+    libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
+    libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
+    ${stdenv.lib.optionalString stdenv.isDarwin ''
+      libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
+      libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
+    ''}
+  '';
+
+in
+
+stdenv.mkDerivation rec {
+  version = "7.10.3";
+  name = "ghc-${version}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/~ghc/${version}/${name}-src.tar.xz";
+    sha256 = "1vsgmic8csczl62ciz51iv8nhrkm72lyhbz7p7id13y2w7fcx46g";
+  };
+
+  buildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour ];
+
+  enableParallelBuilding = true;
+
+  preConfigure = ''
+    echo >mk/build.mk "${buildMK}"
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+  '';
+
+  configureFlags = [
+    "--with-gcc=${stdenv.cc}/bin/cc"
+    "--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib"
+  ];
+
+  # required, because otherwise all symbols from HSffi.o are stripped, and
+  # that in turn causes GHCi to abort
+  stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/ghc
+
+    # Patch scripts to include "readelf" and "cat" in $PATH.
+    for i in "$out/bin/"*; do
+      test ! -h $i || continue
+      egrep --quiet '^#!' <(head -n 1 $i) || continue
+      sed -i -e '2i export PATH="$PATH:${binutils}/bin:${coreutils}/bin"' $i
+    done
+  '';
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with stdenv.lib.maintainers; [ marcweber andres simons ];
+    inherit (ghc.meta) license platforms;
+  };
+
+}
diff --git a/pkgs/development/compilers/go/1.5.nix b/pkgs/development/compilers/go/1.5.nix
index ce5c2579b89f..30967ae2c158 100644
--- a/pkgs/development/compilers/go/1.5.nix
+++ b/pkgs/development/compilers/go/1.5.nix
@@ -15,11 +15,11 @@ in
 
 stdenv.mkDerivation rec {
   name = "go-${version}";
-  version = "1.5.1";
+  version = "1.5.2";
 
   src = fetchurl {
     url = "https://github.com/golang/go/archive/go${version}.tar.gz";
-    sha256 = "1xd1nd1li7pdl72vq8zkh6m7ms3ajgyqz9a5d61gagm0cgj8zilz";
+    sha256 = "1ggh5ll774an78yiij6xan67n38zglws0pxj36g0rcg84460h4m4";
   };
 
   # perl is used for testing go vet
diff --git a/pkgs/development/compilers/jsonnet/default.nix b/pkgs/development/compilers/jsonnet/default.nix
new file mode 100644
index 000000000000..a91b038ef2d4
--- /dev/null
+++ b/pkgs/development/compilers/jsonnet/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, fetchFromGitHub, emscripten }:
+
+let version = "0.8.5"; in
+
+stdenv.mkDerivation {
+  name = "jsonnet-${version}";
+
+  srcs = fetchFromGitHub {
+    rev = "v${version}";
+    owner = "google";
+    repo = "jsonnet";
+    sha256 = "14raml69zfr38r4qghdgy129vdq2vq1ivl3a2y02isfpijxcajxn";
+  };
+
+  buildInputs = [ emscripten ];
+
+  enableParallelBuilding = true;
+
+  makeFlags = [''EM_CACHE=$(TMPDIR)/.em_cache'' ''all''];
+
+  installPhase = ''
+    mkdir -p $out/bin $out/lib $out/share/
+    cp jsonnet $out/bin/
+    cp libjsonnet.so $out/lib/
+    cp -a doc $out/share/doc
+    cp -a include $out/include
+  '';
+
+  meta = {
+    description = "Purely-functional configuration language that helps you define JSON data";
+    maintainers = [ lib.maintainers.benley ];
+    license = lib.licenses.asl20;
+    homepage = https://github.com/google/jsonnet;
+  };
+}
diff --git a/pkgs/development/compilers/kotlin/default.nix b/pkgs/development/compilers/kotlin/default.nix
new file mode 100644
index 000000000000..e97309f9252c
--- /dev/null
+++ b/pkgs/development/compilers/kotlin/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl, makeWrapper, jre, unzip, which }:
+
+stdenv.mkDerivation rec {
+  version = "1.0.0-beta-3595";
+  name = "kotlin-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/JetBrains/kotlin/releases/download/build-${version}/kotlin-compiler-${version}.zip";
+    sha256 = "1ed750a169a411349852a102d5a9c23aec656acb76d51018a4933741eb846fae";
+  };
+
+  propagatedBuildInputs = [ jre which ] ;
+  buildInputs = [ makeWrapper unzip ] ;
+
+  installPhase = ''
+    mkdir -p $out
+    rm "bin/"*.bat
+    mv * $out
+
+    for p in $(ls $out/bin/) ; do
+      wrapProgram $out/bin/$p --prefix PATH ":" ${jre}/bin ;
+    done
+  '';
+
+  meta = {
+    description = "General purpose programming language";
+    longDescription = ''
+      Kotlin is a statically typed language that targets the JVM and JavaScript.
+      It is a general-purpose language intended for industry use.
+      It is developed by a team at JetBrains although it is an OSS language 
+      and has external contributors.
+    '';
+    homepage = http://kotlinlang.org/;
+    license = stdenv.lib.licenses.asl20;
+    maintainers = with stdenv.lib.maintainers;
+      [ nequissimus ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/compilers/llvm/3.7/llvm.nix b/pkgs/development/compilers/llvm/3.7/llvm.nix
index 57fd3433fa5e..045d2e4951a8 100644
--- a/pkgs/development/compilers/llvm/3.7/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.7/llvm.nix
@@ -14,6 +14,7 @@
 , compiler-rt_src
 , libcxxabi
 , debugVersion ? false
+, enableSharedLibraries ? !stdenv.isDarwin
 }:
 
 let
@@ -46,10 +47,11 @@ in stdenv.mkDerivation rec {
     "-DLLVM_BUILD_TESTS=ON"
     "-DLLVM_ENABLE_FFI=ON"
     "-DLLVM_ENABLE_RTTI=ON"
-  ] ++ stdenv.lib.optionals (!isDarwin) [
+  ] ++ stdenv.lib.optional enableSharedLibraries
     "-DBUILD_SHARED_LIBS=ON"
+    ++ stdenv.lib.optional (!isDarwin)
     "-DLLVM_BINUTILS_INCDIR=${binutils}/include"
-  ] ++ stdenv.lib.optionals ( isDarwin) [
+    ++ stdenv.lib.optionals ( isDarwin) [
     "-DLLVM_ENABLE_LIBCXX=ON"
     "-DCAN_TARGET_i386=false"
   ];
diff --git a/pkgs/development/compilers/nim/default.nix b/pkgs/development/compilers/nim/default.nix
index 20f7a87c254f..cfa725d3d315 100644
--- a/pkgs/development/compilers/nim/default.nix
+++ b/pkgs/development/compilers/nim/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
     { description = "Statically typed, imperative programming language";
       homepage = http://nim-lang.org/;
       license = licenses.mit;
-      maintainers = with maintainers; [ emery ];
+      maintainers = with maintainers; [ ehmry ];
       platforms = platforms.linux ++ platforms.darwin; # arbitrary
     };
 }
diff --git a/pkgs/development/compilers/rustc/generic.nix b/pkgs/development/compilers/rustc/generic.nix
index 2b4a7717016d..b88782517d76 100644
--- a/pkgs/development/compilers/rustc/generic.nix
+++ b/pkgs/development/compilers/rustc/generic.nix
@@ -37,6 +37,8 @@ let version = if isRelease then
 
     name = "rustc-${version}";
 
+    llvmShared = llvmPackages_37.llvm.override { enableSharedLibraries = true; };
+
     platform = if stdenv.system == "i686-linux"
       then "linux-i386"
       else if stdenv.system == "x86_64-linux"
@@ -84,6 +86,8 @@ with stdenv.lib; stdenv.mkDerivation {
 
   __impureHostDeps = [ "/usr/lib/libedit.3.dylib" ];
 
+  NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-rpath ${llvmShared}/lib";
+
   src = if isRelease then
       fetchzip {
         url = "http://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
@@ -119,7 +123,7 @@ with stdenv.lib; stdenv.mkDerivation {
                 # ++ [ "--jemalloc-root=${jemalloc}/lib"
                 ++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${binutils}/bin/ar" ]
                 ++ optional (stdenv.cc.cc ? isClang) "--enable-clang"
-                ++ optional (!forceBundledLLVM) "--llvm-root=${llvmPackages_37.llvm}";
+                ++ optional (!forceBundledLLVM) "--llvm-root=${llvmShared}";
 
   inherit patches;
 
@@ -155,11 +159,10 @@ with stdenv.lib; stdenv.mkDerivation {
     configureFlagsArray+=("--infodir=$out/share/info")
   '';
 
-  # Procps is needed for one of the test cases
-  nativeBuildInputs = [ file python2 ]
-    ++ optionals stdenv.isLinux [ procps ];
+  # ps is needed for one of the test cases
+  nativeBuildInputs = [ file python2 procps ];
   buildInputs = [ ncurses ]
-    ++ optional (!forceBundledLLVM) llvmPackages_37.llvm;
+    ++ optional (!forceBundledLLVM) llvmShared;
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/compilers/rustc/head.nix b/pkgs/development/compilers/rustc/head.nix
index dc1bda27d975..ac2323483286 100644
--- a/pkgs/development/compilers/rustc/head.nix
+++ b/pkgs/development/compilers/rustc/head.nix
@@ -2,11 +2,11 @@
 { stdenv, callPackage }:
 
 callPackage ./generic.nix {
-  shortVersion = "2015-11-01";
+  shortVersion = "2015-12-09";
   isRelease = false;
   forceBundledLLVM = true;
-  srcRev = "1a2eaffb6";
-  srcSha = "17b8zgz8j5dmz489b4zs2q4igc9x2v4isgqg3i5nzhacghxjqfyy";
+  srcRev = "462ec0576";
+  srcSha = "1mci0hxwnqb24j4k68rgffqk8ccznz2iddfmyhi8wxa094hqgghp";
 
   /* Rust is bootstrapped from an earlier built version. We need
   to fetch these earlier versions, which vary per platform.
diff --git a/pkgs/development/compilers/sbcl/bootstrap.nix b/pkgs/development/compilers/sbcl/bootstrap.nix
index d95e3e0cd897..0114f014a51e 100644
--- a/pkgs/development/compilers/sbcl/bootstrap.nix
+++ b/pkgs/development/compilers/sbcl/bootstrap.nix
@@ -23,6 +23,7 @@ let
       sha256 = "0sp5445rbvms6qvzhld0kwwvydw51vq5iaf4kdqsf2d9jvaz3yx5";
     };
     armv6l-linux = armv7l-linux;
+    x86_64-solaris = x86_64-linux;
   };
   cfg = options.${stdenv.system};
 in
diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index 7b2cadc31d58..87cb5e6fcfd2 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name    = "sbcl-${version}";
-  version = "1.3.0";
+  version = "1.3.1";
 
   src = fetchurl {
     url    = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2";
-    sha256 = "1cwrmvbx8m7n7wkcm16yz7qwx221giz7jskzkvy42pj919may36n";
+    sha256 = "0ggdw2wfbl0gmfkcm3qbqvhalfb1r9wfxzmi8fd38s53f7j4grd2";
   };
 
   patchPhase = ''
@@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
   '';
 
   buildPhase = ''
-    sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost} --disable-debugger --no-userinit --no-sysinit"
+    sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}"
   '';
 
   installPhase = ''
diff --git a/pkgs/development/compilers/scala/2.10.nix b/pkgs/development/compilers/scala/2.10.nix
index ab13e0ba7dc3..26fd3850190b 100644
--- a/pkgs/development/compilers/scala/2.10.nix
+++ b/pkgs/development/compilers/scala/2.10.nix
@@ -8,7 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "1ckyz31gmf2pgdl51h1raa669mkl7sqfdl3vqkrmyc46w5ysz3ci";
   };
 
-  buildInputs = [ jre makeWrapper ] ;
+  propagatedBuildInputs = [ jre ] ;
+  buildInputs = [ makeWrapper ] ;
 
   installPhase = ''
     mkdir -p $out
diff --git a/pkgs/development/compilers/scala/default.nix b/pkgs/development/compilers/scala/default.nix
index 289c63f7bcf9..ec80317c7777 100644
--- a/pkgs/development/compilers/scala/default.nix
+++ b/pkgs/development/compilers/scala/default.nix
@@ -8,7 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "1l16571fw5l339wd02w2pnr3556j804zpbsbymnad67f2dpikr7z";
   };
 
-  buildInputs = [ jre makeWrapper ] ;
+  propagatedBuildInputs = [ jre ] ;
+  buildInputs = [ makeWrapper ] ;
 
   installPhase = ''
     mkdir -p $out