From 0e2456da8252d8d967c240f1d3ababece0b5f77d Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 28 May 2020 17:43:00 +0200 Subject: [PATCH] metals: provide client-agnostic flavor --- pkgs/development/tools/metals/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/tools/metals/default.nix b/pkgs/development/tools/metals/default.nix index cf9ce2bd265..5f4af626877 100644 --- a/pkgs/development/tools/metals/default.nix +++ b/pkgs/development/tools/metals/default.nix @@ -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"