depot/third_party/nixpkgs/pkgs/development/tools/build-managers/mill/default.nix
Default email 0eaa97ffad Project import generated by Copybara.
GitOrigin-RevId: c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38
2020-08-20 19:08:02 +02:00

43 lines
1.4 KiB
Nix

{ stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
pname = "mill";
version = "0.8.0";
src = fetchurl {
url = "https://github.com/lihaoyi/mill/releases/download/${version}/${version}";
sha256 = "04pf76iyrbq2h2hksx0r2fmnd0d9mi6an24zvfv7k79rch11cql1";
};
nativeBuildInputs = [ makeWrapper ];
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
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" \
--set JAVA_HOME "${jre}" \
--set MILL_VERSION "${version}"
runHook postInstall
'';
meta = with stdenv.lib; {
homepage = "https://www.lihaoyi.com/mill";
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;
};
}