1 { lib, stdenv, jre, coursier, makeWrapper, installShellFiles, setJavaClassPath }:
6 deps = stdenv.mkDerivation {
7 name = "${baseName}-deps-${version}";
9 export COURSIER_CACHE=$(pwd)
10 ${coursier}/bin/cs fetch ch.epfl.scala:scalafix-cli_2.13.8:${version} > deps
11 mkdir -p $out/share/java
12 cp $(< deps) $out/share/java/
14 outputHashMode = "recursive";
15 outputHash = "sha256-lDeg90L484MggtQ2a9OyHv4UcfLPjzG3OJZCaWW2AC8=";
22 nativeBuildInputs = [ makeWrapper installShellFiles setJavaClassPath ];
23 buildInputs = [ deps ];
28 makeWrapper ${jre}/bin/java $out/bin/${baseName} \
29 --add-flags "-cp $CLASSPATH scalafix.cli.Cli"
31 installShellCompletion --cmd ${baseName} \
32 --bash <($out/bin/${baseName} --bash) \
33 --zsh <($out/bin/${baseName} --zsh)
36 installCheckPhase = ''
37 $out/bin/${baseName} --version | grep -q "${version}"
41 description = "Refactoring and linting tool for Scala";
42 homepage = "https://scalacenter.github.io/scalafix/";
43 license = licenses.bsd3;
44 maintainers = [ maintainers.tomahna ];