Change:
Project description Scala 3 is more than a year old. It would be nice to have it packaged in nixpkgs as well. Maybe it is, but I couldn't find it under "scala-3" or respective versions. Metadata homepage URL: https://scala- source URL: license: Apache-2.0 License platforms: unix, linux, darwin, ...
is already packaged.
Indeed: the Scala 3 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 ), we should probably rename the package to as well? /cc
Feel free to update, rename and alias the old name :) Maybe should point at and can be

Discussion:
<ins> { lib, stdenv, fetchurl, makeWrapper, jre, ncurses }: stdenv.mkDerivation rec { version = "3.1.0"; pname = "scala-bare"; src = fetchurl { url = "https://github.com/lampepfl/dotty/releases/download/${version}/scala3-${version}.tar.gz"; sha256 = "9bsZ2FtIb6AvA3W3r2Vv0dPNicuYjMBz3X48z45Avv8="; }; propagatedBuildInputs = [ jre ncurses.dev ] ; nativeBuildInputs = [ 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 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 maintainers.virusdave]; }; } </ins>

<ins> { 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; } </ins>

<del> { lib, stdenv, fetchurl, makeWrapper, jre, ncurses }: stdenv.mkDerivation rec { version = "3.1.0"; pname = "dotty-bare"; src = fetchurl { url = "https://github.com/lampepfl/dotty/releases/download/${version}/scala3-${version}.tar.gz"; sha256 = "9bsZ2FtIb6AvA3W3r2Vv0dPNicuYjMBz3X48z45Avv8="; }; propagatedBuildInputs = [ jre ncurses.dev ] ; nativeBuildInputs = [ 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 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 maintainers.virusdave]; }; } </del>

<del> { 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; } </del>

dictu = callPackage ../development/compilers/dictu { }; <del> dotty = callPackage ../development/compilers/scala/dotty.nix { }; </del> ecl = callPackage ../development/compilers/ecl { }; ecl_16_1_2 = callPackage ../development/compilers/ecl/16.1.2.nix { };

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"; }; <ins> scala_3 = callPackage ../development/compilers/scala { }; # deprecated dotty = scala_3; </ins> scala = scala_2_13; scala-runners = callPackage ../development/compilers/scala-runners {