1 { lib, stdenv, coursier, buildGraalvmNativeImage }:
4 baseName = "scala-update";
6 deps = stdenv.mkDerivation {
7 name = "${baseName}-deps-${version}";
9 export COURSIER_CACHE=$(pwd)
10 ${coursier}/bin/cs fetch io.github.kitlangton:scala-update_2.13:${version} > deps
11 mkdir -p $out/share/java
12 cp $(< deps) $out/share/java/
14 outputHashMode = "recursive";
15 outputHashAlgo = "sha256";
16 outputHash = "kNnFzzHn+rFq4taqRYjBYaDax0MHW+vIoSFVN3wxA8M=";
18 in buildGraalvmNativeImage {
22 buildInputs = [ deps ];
24 src = "${deps}/share/java/${baseName}_2.13-${version}.jar";
26 extraNativeImageBuildArgs =
27 [ "--no-fallback" "--enable-url-protocols=https" "update.Main" ];
32 native-image ''${nativeImageBuildArgs[@]} -cp $(JARS=("${deps}/share/java"/*.jar); IFS=:; echo "''${JARS[*]}")
37 installCheckPhase = ''
38 $out/bin/${baseName} --version | grep -q "${version}"
42 description = "Update your Scala dependencies interactively";
43 homepage = "https://github.com/kitlangton/scala-update";
44 license = licenses.asl20;
45 maintainers = [ maintainers.rtimush ];