2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, jre, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mill";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.11.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "https://github.com/com-lihaoyi/mill/releases/download/${version}/${version}-assembly";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-4X+ufTHECOmM797SN0VFAE8b9mnHkdOqSJ8h29PujLU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
# this is mostly downloading a pre-built artifact
|
|
|
|
preferLocal = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dm555 "$src" "$out/bin/.mill-wrapped"
|
|
|
|
# can't use wrapProgram because it sets --argv0
|
|
|
|
makeWrapper "$out/bin/.mill-wrapped" "$out/bin/mill" \
|
|
|
|
--prefix PATH : "${jre}/bin" \
|
2020-11-15 13:44:38 +00:00
|
|
|
--set JAVA_HOME "${jre}"
|
2020-04-24 23:36:52 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
# The default release is a script which will do an impure download
|
|
|
|
# just ensure that the application can run without network
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/mill --help > /dev/null
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-01-13 20:06:32 +00:00
|
|
|
homepage = "https://com-lihaoyi.github.io/mill/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
description = "A build tool for Scala, Java and more";
|
|
|
|
longDescription = ''
|
|
|
|
Mill is a build tool borrowing ideas from modern tools like Bazel, to let you build
|
|
|
|
your projects in a way that's simple, fast, and predictable. Mill has built in
|
|
|
|
support for the Scala programming language, and can serve as a replacement for
|
|
|
|
SBT, but can also be extended to support any other language or platform via
|
|
|
|
modules (written in Java or Scala) or through an external subprocesses.
|
|
|
|
'';
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ scalavision zenithal ];
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|