lol
at 24.11-pre 53 lines 1.8 kB view raw
1{ lib, stdenv, fetchurl, jre, makeWrapper }: 2 3stdenv.mkDerivation rec { 4 pname = "mill"; 5 version = "0.11.7"; 6 7 src = fetchurl { 8 url = "https://github.com/com-lihaoyi/mill/releases/download/${version}/${version}-assembly"; 9 hash = "sha256-iijKZlQoiIWos+Kdq9hIgiM5yM7xCf11abrJ71LO9jA="; 10 }; 11 12 nativeBuildInputs = [ makeWrapper ]; 13 14 dontUnpack = true; 15 dontConfigure = true; 16 dontBuild = true; 17 18 # this is mostly downloading a pre-built artifact 19 preferLocal = true; 20 21 installPhase = '' 22 runHook preInstall 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}" 28 runHook postInstall 29 ''; 30 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 36 ''; 37 38 meta = with lib; { 39 homepage = "https://com-lihaoyi.github.io/mill/"; 40 license = licenses.mit; 41 description = "A build tool for Scala, Java and more"; 42 mainProgram = "mill"; 43 longDescription = '' 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. 49 ''; 50 maintainers = with maintainers; [ scalavision zenithal ]; 51 platforms = lib.platforms.all; 52 }; 53}