scalafmt: deprecate phases and use pname&version
This commit is contained in:
parent
2f9cf506dd
commit
e66d3c1d56
1 changed files with 8 additions and 5 deletions
|
@ -17,21 +17,24 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "${baseName}-${version}";
|
pname = baseName;
|
||||||
|
inherit version;
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildInputs = [ jdk deps ];
|
buildInputs = [ jdk deps ];
|
||||||
|
|
||||||
doCheck = true;
|
dontUnpack = true;
|
||||||
|
|
||||||
phases = [ "installPhase" "checkPhase" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
makeWrapper ${jre}/bin/java $out/bin/${baseName} \
|
makeWrapper ${jre}/bin/java $out/bin/${baseName} \
|
||||||
--add-flags "-cp $CLASSPATH org.scalafmt.cli.Cli"
|
--add-flags "-cp $CLASSPATH org.scalafmt.cli.Cli"
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
installCheckPhase = ''
|
||||||
$out/bin/${baseName} --version | grep -q "${version}"
|
$out/bin/${baseName} --version | grep -q "${version}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue