diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/scala')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/scala/2.10.nix | 43 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/compilers/scala/2.11.nix | 43 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/compilers/scala/default.nix | 46 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/compilers/scala/dotty-bare.nix | 40 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/compilers/scala/dotty.nix | 22 |
5 files changed, 194 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/scala/2.10.nix b/nixpkgs/pkgs/development/compilers/scala/2.10.nix new file mode 100644 index 000000000000..16e0389ad031 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/scala/2.10.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl, makeWrapper, jre, gnugrep, coreutils }: + +stdenv.mkDerivation rec { + name = "scala-2.10.7"; + + src = fetchurl { + url = "https://www.scala-lang.org/files/archive/${name}.tgz"; + sha256 = "04gi55lzgrhsb78qw8jmnccqim92rw6898knw0a7gfzn2sci30wj"; + }; + + propagatedBuildInputs = [ jre ] ; + buildInputs = [ makeWrapper ] ; + + installPhase = '' + mkdir -p $out + rm bin/*.bat + mv * $out + + for p in $(ls $out/bin/) ; do + wrapProgram $out/bin/$p \ + --prefix PATH ":" ${coreutils}/bin \ + --prefix PATH ":" ${gnugrep}/bin \ + --prefix PATH ":" ${jre}/bin \ + --set JAVA_HOME ${jre} + done + ''; + + meta = { + description = "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 = https://www.scala-lang.org/; + license = stdenv.lib.licenses.bsd3; + platforms = stdenv.lib.platforms.all; + branch = "2.10"; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/scala/2.11.nix b/nixpkgs/pkgs/development/compilers/scala/2.11.nix new file mode 100644 index 000000000000..a1f803b67193 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/scala/2.11.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl, makeWrapper, jre, gnugrep, coreutils }: + +stdenv.mkDerivation rec { + name = "scala-2.11.12"; + + src = fetchurl { + url = "https://www.scala-lang.org/files/archive/${name}.tgz"; + sha256 = "1a4nc4qp9dm4rps47j92hlmxxqskv67qbdmjqc5zd94wd4rps7di"; + }; + + propagatedBuildInputs = [ jre ] ; + buildInputs = [ makeWrapper ] ; + + installPhase = '' + mkdir -p $out + rm "bin/"*.bat + mv * $out + + for p in $(ls $out/bin/) ; do + wrapProgram $out/bin/$p \ + --prefix PATH ":" ${coreutils}/bin \ + --prefix PATH ":" ${gnugrep}/bin \ + --prefix PATH ":" ${jre}/bin \ + --set JAVA_HOME ${jre} + done + ''; + + meta = { + description = "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 = https://www.scala-lang.org/; + license = stdenv.lib.licenses.bsd3; + platforms = stdenv.lib.platforms.all; + branch = "2.11"; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/scala/default.nix b/nixpkgs/pkgs/development/compilers/scala/default.nix new file mode 100644 index 000000000000..ce863ef9c915 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/scala/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchurl, makeWrapper, jre, gnugrep, coreutils }: + +stdenv.mkDerivation rec { + name = "scala-2.12.8"; + + src = fetchurl { + url = "https://www.scala-lang.org/files/archive/${name}.tgz"; + sha256 = "18w0vdbsp0q5rxglgalwlgkggld926bqi1fxc598rn4gh46a03j4"; + }; + + propagatedBuildInputs = [ jre ] ; + buildInputs = [ makeWrapper ] ; + + installPhase = '' + mkdir -p $out + rm "bin/"*.bat + mv * $out + + # put docs in correct subdirectory + mkdir -p $out/share/doc + mv $out/doc $out/share/doc/scala + + for p in $(ls $out/bin/) ; do + wrapProgram $out/bin/$p \ + --prefix PATH ":" ${coreutils}/bin \ + --prefix PATH ":" ${gnugrep}/bin \ + --prefix PATH ":" ${jre}/bin \ + --set JAVA_HOME ${jre} + done + ''; + + meta = { + description = "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 = https://www.scala-lang.org/; + license = stdenv.lib.licenses.bsd3; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/scala/dotty-bare.nix b/nixpkgs/pkgs/development/compilers/scala/dotty-bare.nix new file mode 100644 index 000000000000..5f1d384a3283 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/scala/dotty-bare.nix @@ -0,0 +1,40 @@ +{ stdenv, fetchurl, makeWrapper, jre, ncurses }: + +stdenv.mkDerivation rec { + version = "0.10.0-RC1"; + name = "dotty-bare-${version}"; + + src = fetchurl { + url = "https://github.com/lampepfl/dotty/releases/download/${version}/dotty-${version}.tar.gz"; + sha256 = "0s9vh0d6xx99gl0ji0dgmbq36f79c0iwfbrfqwmaclqm9yq5m54k"; + }; + + propagatedBuildInputs = [ jre ncurses.dev ] ; + buildInputs = [ makeWrapper ] ; + + installPhase = '' + mkdir -p $out + mv * $out + ''; + + fixupPhase = '' + bin_files=$(find $out/bin -type f ! -name common) + for f in $bin_files ; do + wrapProgram $f --set JAVA_HOME ${jre} --prefix PATH : '${ncurses.dev}/bin' + done + ''; + + meta = with stdenv.lib; { + description = "Research platform for new language concepts and compiler technologies for Scala."; + longDescription = '' + Dotty is a platform to try out new language concepts and compiler technologies for Scala. + The focus is mainly on simplification. We remove extraneous syntax (e.g. no XML literals), + and try to boil down Scala’s types into a smaller set of more fundamental constructs. + The theory behind these constructs is researched in DOT, a calculus for dependent object types. + ''; + homepage = http://dotty.epfl.ch/; + license = licenses.bsd3; + platforms = platforms.all; + maintainers = [maintainers.karolchmist]; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/scala/dotty.nix b/nixpkgs/pkgs/development/compilers/scala/dotty.nix new file mode 100644 index 000000000000..a999bd422e63 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/scala/dotty.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, makeWrapper, jre, callPackage }: + +let + dotty-bare = callPackage ./dotty-bare.nix { + inherit stdenv fetchurl makeWrapper jre; + }; +in + +stdenv.mkDerivation { + name = "dotty-${dotty-bare.version}"; + + unpackPhase = ":"; + + installPhase = '' + mkdir -p $out/bin + ln -s ${dotty-bare}/bin/dotc $out/bin/dotc + ln -s ${dotty-bare}/bin/dotd $out/bin/dotd + ln -s ${dotty-bare}/bin/dotr $out/bin/dotr + ''; + + inherit (dotty-bare) meta; +} |