10 stdenv.mkDerivation rec {
14 deps = stdenv.mkDerivation {
15 name = "${pname}-deps-${version}";
17 export COURSIER_CACHE=$(pwd)
18 ${coursier}/bin/cs fetch org.scalameta:metals_2.13:${version} \
19 -r bintray:scalacenter/releases \
20 -r sonatype:snapshots > deps
21 mkdir -p $out/share/java
22 cp $(< deps) $out/share/java/
24 outputHashMode = "recursive";
25 outputHashAlgo = "sha256";
26 outputHash = "sha256-bvdLEHJgtLAu7C/jLMpcmFOVqASPNbiyN3q4qtYL3ls=";
33 buildInputs = [ deps ];
37 extraJavaOpts = "-XX:+UseG1GC -XX:+UseStringDeduplication -Xss4m -Xms100m";
42 makeWrapper ${jre}/bin/java $out/bin/metals \
43 --add-flags "${extraJavaOpts} -cp $CLASSPATH scala.meta.metals.Main"
47 homepage = "https://scalameta.org/metals/";
48 license = licenses.asl20;
49 description = "Language server for Scala";
50 mainProgram = "metals";
51 maintainers = with maintainers; [