2017-12-10 18:47:28 +00:00
|
|
|
{ stdenv, fetchFromGitHub, which, curl, makeWrapper, jdk }:
|
2017-10-26 01:30:45 +01:00
|
|
|
|
|
|
|
let
|
2018-01-10 00:21:28 +00:00
|
|
|
rev = "3c8fcadc3376edfd8e4b08b35f174935bf97bbac";
|
2017-10-26 01:30:45 +01:00
|
|
|
version = stdenv.lib.strings.substring 0 7 rev;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "sbt-extras-${version}";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "paulp";
|
|
|
|
repo = "sbt-extras";
|
|
|
|
inherit rev;
|
2018-01-10 00:21:28 +00:00
|
|
|
sha256 = "0r79w4kgdrsdnm4ma9rmb9k115rvidpaha7sr9rsxv68jpagwgrj";
|
2017-10-26 01:30:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
2017-10-31 20:27:48 +00:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2017-10-26 01:30:45 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2017-12-10 18:47:28 +00:00
|
|
|
|
|
|
|
substituteInPlace bin/sbt --replace 'declare java_cmd="java"' 'declare java_cmd="${jdk}/bin/java"'
|
|
|
|
|
2017-10-26 01:30:45 +01:00
|
|
|
install bin/sbt $out/bin
|
2017-10-31 20:27:48 +00:00
|
|
|
|
2017-12-10 18:47:28 +00:00
|
|
|
wrapProgram $out/bin/sbt --prefix PATH : ${stdenv.lib.makeBinPath [ which curl ]}
|
2017-10-26 01:30:45 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A more featureful runner for sbt, the simple/scala/standard build tool";
|
|
|
|
homepage = https://github.com/paulp/sbt-extras;
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ puffnfresh ];
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|