dotty: rename to scala_3

Major version 3 of the Scala compiler started out under the codename 'dotty', and that's how it was packaged initially in nixpkgs.

Now that dotty has become the 'official' scala 3 compiler (see also b0f0e1d), we should rename the package as well

Fixes #170911
This commit is contained in:
Arnout Engelen 2022-05-05 11:32:30 +02:00
parent cbe587c735
commit 30b459c377
No known key found for this signature in database
GPG key ID: 061107B0F74A6DAA
4 changed files with 28 additions and 27 deletions

View file

@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
version = "3.1.0";
pname = "dotty-bare";
pname = "scala-bare";
src = fetchurl {
url = "https://github.com/lampepfl/dotty/releases/download/${version}/scala3-${version}.tar.gz";

View file

@ -0,0 +1,24 @@
{ stdenv, fetchurl, makeWrapper, jre, callPackage }:
let
bare = callPackage ./bare.nix {
inherit stdenv fetchurl makeWrapper jre;
};
in
stdenv.mkDerivation {
pname = "scala";
inherit (bare) version;
dontUnpack = true;
installPhase = ''
mkdir -p $out/bin
ln -s ${bare}/bin/scalac $out/bin/scalac
ln -s ${bare}/bin/scaladoc $out/bin/scaladoc
ln -s ${bare}/bin/scala $out/bin/scala
ln -s ${bare}/bin/common $out/bin/common
'';
inherit (bare) meta;
}

View file

@ -1,24 +0,0 @@
{ stdenv, fetchurl, makeWrapper, jre, callPackage }:
let
dotty-bare = callPackage ./dotty-bare.nix {
inherit stdenv fetchurl makeWrapper jre;
};
in
stdenv.mkDerivation {
pname = "dotty";
inherit (dotty-bare) version;
dontUnpack = true;
installPhase = ''
mkdir -p $out/bin
ln -s ${dotty-bare}/bin/scalac $out/bin/scalac
ln -s ${dotty-bare}/bin/scaladoc $out/bin/scaladoc
ln -s ${dotty-bare}/bin/scala $out/bin/scala
ln -s ${dotty-bare}/bin/common $out/bin/common
'';
inherit (dotty-bare) meta;
}

View file

@ -12400,8 +12400,6 @@ with pkgs;
dictu = callPackage ../development/compilers/dictu { };
dotty = callPackage ../development/compilers/scala/dotty.nix { };
ecl = callPackage ../development/compilers/ecl { };
ecl_16_1_2 = callPackage ../development/compilers/ecl/16.1.2.nix { };
@ -13805,6 +13803,9 @@ with pkgs;
scala_2_11 = callPackage ../development/compilers/scala/2.x.nix { majorVersion = "2.11"; jre = jdk8; };
scala_2_12 = callPackage ../development/compilers/scala/2.x.nix { majorVersion = "2.12"; };
scala_2_13 = callPackage ../development/compilers/scala/2.x.nix { majorVersion = "2.13"; };
scala_3 = callPackage ../development/compilers/scala { };
# deprecated
dotty = scala_3;
scala = scala_2_13;
scala-runners = callPackage ../development/compilers/scala-runners {