Merge pull request #131404 from Stunkymonkey/scalafix-phases

scalafix: deprecate phases and use pname&version
This commit is contained in:
Sandro 2021-07-24 23:46:45 +00:00 committed by GitHub
commit ecaf3da934
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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}"
'';