2018-12-03 04:15:52 +00:00
|
|
|
{ stdenv, fetchurl, jre, makeWrapper }:
|
2018-12-03 04:45:58 +00:00
|
|
|
|
2018-12-03 04:15:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "mill";
|
2020-02-26 17:18:16 +00:00
|
|
|
version = "0.6.1";
|
2018-12-03 04:15:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/lihaoyi/mill/releases/download/${version}/${version}";
|
2020-02-26 17:18:16 +00:00
|
|
|
sha256 = "1blar5dxhmxlwxhmq8wv0xvhy200qks6xj12n54qx9d5qp300ncw";
|
2018-12-03 04:15:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2019-06-19 16:45:34 +01:00
|
|
|
dontUnpack = true;
|
2018-12-03 04:15:52 +00:00
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
2018-12-03 04:45:58 +00:00
|
|
|
|
2018-12-03 04:15:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dm555 "$src" "$out/bin/.mill-wrapped"
|
|
|
|
# can't use wrapProgram because it sets --argv0
|
2019-12-10 14:40:05 +00:00
|
|
|
makeWrapper "$out/bin/.mill-wrapped" "$out/bin/mill" \
|
|
|
|
--prefix PATH : "${jre}/bin" \
|
|
|
|
--set JAVA_HOME "${jre}" \
|
|
|
|
--set MILL_VERSION "${version}"
|
2018-12-03 04:15:52 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-02-26 17:18:16 +00:00
|
|
|
homepage = "https://www.lihaoyi.com/mill";
|
2018-12-03 04:15: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.
|
|
|
|
'';
|
|
|
|
maintainers = with maintainers; [ scalavision ];
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|