Merge pull request #166718 from thiagokokada/add-graalvmDrv
buildGraalvmNativeImage: allow usage of arbitrary graalvm derivation
This commit is contained in:
commit
d9448bd7d9
3 changed files with 9 additions and 7 deletions
|
@ -13,7 +13,7 @@ buildGraalvmNativeImage rec {
|
|||
jar = "${src}/HentaiAtHome.jar";
|
||||
dontUnpack = true;
|
||||
|
||||
graalvm = graalvm17-ce;
|
||||
graalvmDrv = graalvm17-ce;
|
||||
extraNativeImageBuildArgs = [
|
||||
"--enable-url-protocols=http,https"
|
||||
"--install-exit-handlers"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, stdenv, graalvmCEPackages, glibcLocales }:
|
||||
{ lib, stdenv, graalvm, glibcLocales }:
|
||||
|
||||
{ name ? "${args.pname}-${args.version}"
|
||||
# Final executable name
|
||||
|
@ -19,8 +19,8 @@
|
|||
, extraNativeImageBuildArgs ? [ ]
|
||||
# XMX size of GraalVM during build
|
||||
, graalvmXmx ? "-J-Xmx6g"
|
||||
# The GraalVM to use
|
||||
, graalvm ? graalvmCEPackages.graalvm11-ce
|
||||
# The GraalVM derivation to use
|
||||
, graalvmDrv ? graalvm
|
||||
, meta ? { }
|
||||
, ...
|
||||
} @ args:
|
||||
|
@ -28,7 +28,7 @@
|
|||
stdenv.mkDerivation (args // {
|
||||
inherit dontUnpack;
|
||||
|
||||
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ graalvm glibcLocales ];
|
||||
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ graalvmDrv glibcLocales ];
|
||||
|
||||
nativeImageBuildArgs = nativeImageBuildArgs ++ extraNativeImageBuildArgs ++ [ graalvmXmx ];
|
||||
|
||||
|
@ -52,7 +52,7 @@ stdenv.mkDerivation (args // {
|
|||
|
||||
meta = {
|
||||
# default to graalvm's platforms
|
||||
platforms = graalvm.meta.platforms;
|
||||
platforms = graalvmDrv.meta.platforms;
|
||||
# default to executable name
|
||||
mainProgram = executable;
|
||||
} // meta;
|
||||
|
|
|
@ -12866,7 +12866,9 @@ with pkgs;
|
|||
});
|
||||
graalvm11-ce = graalvmCEPackages.graalvm11-ce;
|
||||
graalvm17-ce = graalvmCEPackages.graalvm17-ce;
|
||||
buildGraalvmNativeImage = callPackage ../build-support/build-graalvm-native-image { };
|
||||
buildGraalvmNativeImage = callPackage ../build-support/build-graalvm-native-image {
|
||||
graalvm = graalvm11-ce;
|
||||
};
|
||||
|
||||
inherit (callPackages ../development/compilers/graalvm/enterprise-edition.nix { })
|
||||
graalvm8-ee
|
||||
|
|
Loading…
Reference in a new issue