1 { lib, stdenv, fetchurl, jre, makeWrapper }:
3 stdenv.mkDerivation rec {
8 url = "https://github.com/com-lihaoyi/mill/releases/download/${version}/${version}-assembly";
9 hash = "sha256-iijKZlQoiIWos+Kdq9hIgiM5yM7xCf11abrJ71LO9jA=";
12 nativeBuildInputs = [ makeWrapper ];
18 # this is mostly downloading a pre-built artifact
23 install -Dm555 "$src" "$out/bin/.mill-wrapped"
24 # can't use wrapProgram because it sets --argv0
25 makeWrapper "$out/bin/.mill-wrapped" "$out/bin/mill" \
26 --prefix PATH : "${jre}/bin" \
27 --set JAVA_HOME "${jre}"
31 doInstallCheck = true;
32 # The default release is a script which will do an impure download
33 # just ensure that the application can run without network
34 installCheckPhase = ''
35 $out/bin/mill --help > /dev/null
39 homepage = "https://com-lihaoyi.github.io/mill/";
40 license = licenses.mit;
41 description = "A build tool for Scala, Java and more";
44 Mill is a build tool borrowing ideas from modern tools like Bazel, to let you build
45 your projects in a way that's simple, fast, and predictable. Mill has built in
46 support for the Scala programming language, and can serve as a replacement for
47 SBT, but can also be extended to support any other language or platform via
48 modules (written in Java or Scala) or through an external subprocesses.
50 maintainers = with maintainers; [ scalavision zenithal ];
51 platforms = lib.platforms.all;