about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorKarn Kallio <kkallio@skami.org>2013-11-09 17:14:05 -0430
committerPeter Simons <simons@cryp.to>2013-11-11 12:11:00 +0100
commit1e80c57274b7e2877ac554b5a51f868253fafdc1 (patch)
tree9c8df21ec5440f7e2bdf7fa3d86a902c752d963a /pkgs/development/compilers
parent6441a9c1d08a0c309f7a85980b9ad86f2d84ecd5 (diff)
downloadnixlib-1e80c57274b7e2877ac554b5a51f868253fafdc1.tar
nixlib-1e80c57274b7e2877ac554b5a51f868253fafdc1.tar.gz
nixlib-1e80c57274b7e2877ac554b5a51f868253fafdc1.tar.bz2
nixlib-1e80c57274b7e2877ac554b5a51f868253fafdc1.tar.lz
nixlib-1e80c57274b7e2877ac554b5a51f868253fafdc1.tar.xz
nixlib-1e80c57274b7e2877ac554b5a51f868253fafdc1.tar.zst
nixlib-1e80c57274b7e2877ac554b5a51f868253fafdc1.zip
scala: add expression for scala 2.10.x branch.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/scala/2.9.nix34
-rw-r--r--pkgs/development/compilers/scala/default.nix17
2 files changed, 44 insertions, 7 deletions
diff --git a/pkgs/development/compilers/scala/2.9.nix b/pkgs/development/compilers/scala/2.9.nix
new file mode 100644
index 000000000000..a7c9dbc90736
--- /dev/null
+++ b/pkgs/development/compilers/scala/2.9.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl }:
+
+# at runtime, need jre or jdk
+
+stdenv.mkDerivation rec {
+  name = "scala-2.9.2";
+
+  src = fetchurl {
+    url = "http://www.scala-lang.org/downloads/distrib/files/${name}.tgz";
+    sha256 = "0s1shpzw2hyz7bwxdqq19rcrzbpq4d7b0kvdvjvhy7h05x496b46";
+  };
+
+  installPhase = ''
+    mkdir -p $out
+    rm bin/*.bat
+    rm lib/scalacheck.jar
+    mv * $out
+  '';
+
+  meta = {
+    description = "Scala is a general purpose programming language";
+    longDescription = ''
+      Scala is a general purpose programming language designed to express
+      common programming patterns in a concise, elegant, and type-safe way.
+      It smoothly integrates features of object-oriented and functional
+      languages, enabling Java and other programmers to be more productive.
+      Code sizes are typically reduced by a factor of two to three when
+      compared to an equivalent Java application.
+    '';
+    homepage = http://www.scala-lang.org/;
+    license = "BSD";
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/pkgs/development/compilers/scala/default.nix b/pkgs/development/compilers/scala/default.nix
index a7c9dbc90736..c128baf5100f 100644
--- a/pkgs/development/compilers/scala/default.nix
+++ b/pkgs/development/compilers/scala/default.nix
@@ -1,20 +1,23 @@
-{ stdenv, fetchurl }:
-
-# at runtime, need jre or jdk
+{ stdenv, fetchurl, makeWrapper, jre }:
 
 stdenv.mkDerivation rec {
-  name = "scala-2.9.2";
+  name = "scala-2.10.3";
 
   src = fetchurl {
-    url = "http://www.scala-lang.org/downloads/distrib/files/${name}.tgz";
-    sha256 = "0s1shpzw2hyz7bwxdqq19rcrzbpq4d7b0kvdvjvhy7h05x496b46";
+    url = "http://www.scala-lang.org/files/archive/${name}.tgz";
+    sha256 = "16ac935wydrxrvijv4ldnz4vl2xk8yb3yzb9bsi3nb9sic7fxl95";
   };
 
+  buildInputs = [ jre makeWrapper ] ;
+
   installPhase = ''
     mkdir -p $out
     rm bin/*.bat
-    rm lib/scalacheck.jar
     mv * $out
+
+    for p in $(ls $out/bin/) ; do
+      wrapProgram $out/bin/$p --prefix PATH ":" ${jre}/bin ;
+    done
   '';
 
   meta = {