anchor.diff:      # 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"
   
       makeWrapper ${jre}/bin/java $out/bin/metals-vim \
  -      --prefix PATH : ${lib.makeBinPath [ jdk ]} \
         --add-flags "${extraJavaOpts} -Dmetals.client=coc.nvim -cp $CLASSPATH scala.meta.metals.Main"
   
       makeWrapper ${jre}/bin/java $out/bin/metals-vim-lsc \
  -      --prefix PATH : ${lib.makeBinPath [ jdk ]} \
         --add-flags "${extraJavaOpts} -Dmetals.client=vim-lsc -cp $CLASSPATH scala.meta.metals.Main"
   
       makeWrapper ${jre}/bin/java $out/bin/metals-sublime \
  -      --prefix PATH : ${lib.makeBinPath [ jdk ]} \
         --add-flags "${extraJavaOpts} -Dmetals.client=sublime -cp $CLASSPATH scala.meta.metals.Main"
     '';
   
  
positive.code: { stdenv, lib, coursier, jdk, jre, makeWrapper }:
  
  stdenv.mkDerivation rec {
    pname = "metals";
    version = "0.11.2";
  
    deps = stdenv.mkDerivation {
      name = "${pname}-deps-${version}";
      buildCommand = ''
        export COURSIER_CACHE=$(pwd)
        ${coursier}/bin/cs fetch org.scalameta:metals_2.12:${version} \
          -r bintray:scalacenter/releases \
          -r sonatype:snapshots > deps
        mkdir -p $out/share/java
  
negative.code:     '';
      outputHashMode = "recursive";
      outputHashAlgo = "sha256";
      outputHash     = "sha256-ZHl+uqYTSMEMR1CSo0btxEn/NQz7MNwh4JISm2L5B3Y=";
    };
  
    nativeBuildInputs = [ makeWrapper setJavaClassPath ];
    buildInputs = [ deps ];
  
    dontUnpack = true;
  
  