scalafix: deprecate phases and use pname&version

This commit is contained in:
Felix Buehler 2021-07-25 01:27:41 +02:00
parent 8f67e19b84
commit 4a7e4dd645

View file

@ -17,21 +17,20 @@ let
};
in
stdenv.mkDerivation {
name = "${baseName}-${version}";
pname = baseName;
inherit version;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jdk deps ];
doCheck = true;
phases = [ "installPhase" "checkPhase" ];
dontUnpack = true;
installPhase = ''
makeWrapper ${jre}/bin/java $out/bin/${baseName} \
--add-flags "-cp $CLASSPATH scalafix.cli.Cli"
'';
checkPhase = ''
installCheckPhase = ''
$out/bin/${baseName} --version | grep -q "${version}"
'';