mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +03:00
Merge pull request #208145 from kubukoz/scala-cli-move-assert
This commit is contained in:
commit
f2e37ce5b7
1 changed files with 5 additions and 2 deletions
|
@ -10,7 +10,6 @@
|
||||||
, jre
|
, jre
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert lib.versionAtLeast jre.version "17.0.0";
|
|
||||||
let
|
let
|
||||||
pname = "scala-cli";
|
pname = "scala-cli";
|
||||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||||
|
@ -22,7 +21,11 @@ stdenv.mkDerivation {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
nativeBuildInputs = [ installShellFiles makeWrapper ]
|
nativeBuildInputs = [ installShellFiles makeWrapper ]
|
||||||
++ lib.optional stdenv.isLinux autoPatchelfHook;
|
++ 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 =
|
src =
|
||||||
let
|
let
|
||||||
asset = assets."${stdenv.hostPlatform.system}" or (throw "Unsupported platform ${stdenv.hostPlatform.system}");
|
asset = assets."${stdenv.hostPlatform.system}" or (throw "Unsupported platform ${stdenv.hostPlatform.system}");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue