Merge pull request #89115 from timokau/metals-client-agnostic

metals: provide client-agnostic flavor
This commit is contained in:
Timo Kaufmann 2020-05-28 18:55:20 +00:00 committed by GitHub
commit d6cf34ea5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,13 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
# This variant is not targeted at any particular client, clients are
# expected to declare their supported features in initialization options.
makeWrapper ${jre}/bin/java $out/bin/metals \
--prefix PATH : ${lib.makeBinPath [ jdk ]} \
--add-flags "${extraJavaOpts} -cp $CLASSPATH scala.meta.metals.Main"
# Further variants targeted at clients with featuresets pre-set.
makeWrapper ${jre}/bin/java $out/bin/metals-emacs \
--prefix PATH : ${lib.makeBinPath [ jdk ]} \
--add-flags "${extraJavaOpts} -Dmetals.client=emacs -cp $CLASSPATH scala.meta.metals.Main"