Merge pull request #208145 from kubukoz/scala-cli-move-assert

This commit is contained in:
Jakub Kozłowski 2022-12-28 22:46:52 +01:00 committed by GitHub
commit f2e37ce5b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,6 @@
, jre
}:
assert lib.versionAtLeast jre.version "17.0.0";
let
pname = "scala-cli";
sources = builtins.fromJSON (builtins.readFile ./sources.json);
@ -22,7 +21,11 @@ stdenv.mkDerivation {
inherit pname version;
nativeBuildInputs = [ installShellFiles makeWrapper ]
++ lib.optional stdenv.isLinux autoPatchelfHook;
buildInputs = [ coreutils zlib stdenv.cc.cc ];
buildInputs =
assert lib.assertMsg (lib.versionAtLeast jre.version "17.0.0") ''
scala-cli requires Java 17 or newer, but ${jre.name} is ${jre.version}
'';
[ coreutils zlib stdenv.cc.cc ];
src =
let
asset = assets."${stdenv.hostPlatform.system}" or (throw "Unsupported platform ${stdenv.hostPlatform.system}");