3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #114474 from NeQuissimus/sbt_jdk11

sbt: Fix check
This commit is contained in:
Sandro 2021-03-03 14:12:42 +01:00 committed by GitHub
commit e061350a36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-wqdZ/kCjwhoWtaiNAM1m869vByHk6mG2OULfuDotVP0=";
};
patchPhase = ''
postPatch = ''
echo -java-home ${jre.home} >>conf/sbtopts
'';
@ -25,17 +25,16 @@ stdenv.mkDerivation rec {
buildInputs = lib.optionals stdenv.isLinux [ zlib ];
installPhase = ''
runHook preInstall
mkdir -p $out/share/sbt $out/bin
cp -ra . $out/share/sbt
ln -sT ../share/sbt/bin/sbt $out/bin/sbt
ln -sT ../share/sbt/bin/sbtn-x86_64-${
if (stdenv.isDarwin) then "apple-darwin" else "pc-linux"
} $out/bin/sbtn
'';
doInstallCheck = true;
installCheckPhase = ''
($out/bin/sbt --offline --version 2>&1 || true) | grep 'getting org.scala-sbt sbt ${version} (this may take some time)'
runHook postInstall
'';
meta = with lib; {