diff options
author | Thiago Kenji Okada <thiagokokada@gmail.com> | 2023-09-27 22:50:34 +0100 |
---|---|---|
committer | Thiago Kenji Okada <thiagokokada@gmail.com> | 2023-09-27 22:54:55 +0100 |
commit | cfeeda07046d8f03f3b9f14b3f79219349c60ccf (patch) | |
tree | ff81e59e4f65878212aaa8364755f9a1c7f3f047 /pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix | |
parent | 7457b3cec35b52f5d8efc115e2dd449addd80519 (diff) |
graalVMPackages.graalvm-ce-musl: init at 21.0.0
Exposing this derivation so it is easier to test and use.
Diffstat (limited to 'pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix')
-rw-r--r-- | pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix index 858e49f2372a6..7d62411f57401 100644 --- a/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix +++ b/pkgs/development/compilers/graalvm/community-edition/buildGraalvm.nix @@ -14,7 +14,6 @@ , runCommandCC , setJavaClassPath , unzip -, writeShellScriptBin , xorg , zlib # extra params @@ -43,7 +42,6 @@ let "runCommandCC" "setJavaClassPath" "unzip" - "writeShellScriptBin" "xorg" "zlib" "extraCLibs" @@ -61,21 +59,25 @@ let ); # GraalVM 21.3.0+ expects musl-gcc as <system>-musl-gcc - musl-gcc = (writeShellScriptBin "${stdenv.hostPlatform.system}-musl-gcc" ''${lib.getDev musl}/bin/musl-gcc "$@"''); + musl-gcc = (runCommandCC "musl-gcc" { } '' + mkdir -p $out/bin + ln -s ${lib.getDev musl}/bin/musl-gcc $out/bin/${stdenv.hostPlatform.system}-musl-gcc + ''); # GraalVM 23.0.0+ (i.e.: JDK 21.0.0+) clean-up the environment inside darwin # So we need to re-added some env vars to make everything work correctly again - darwin-cc = (runCommandCC "darwin-cc" { - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ darwin.apple_sdk.frameworks.Foundation zlib ]; - } '' + darwin-cc = (runCommandCC "darwin-cc" + { + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ darwin.apple_sdk.frameworks.Foundation zlib ]; + } '' makeWrapper ${stdenv.cc}/bin/cc $out/bin/cc \ --prefix NIX_CFLAGS_COMPILE_${stdenv.cc.suffixSalt} : "$NIX_CFLAGS_COMPILE" \ --prefix NIX_LDFLAGS_${stdenv.cc.suffixSalt} : "$NIX_LDFLAGS" ''); binPath = lib.makeBinPath ( lib.optionals stdenv.isDarwin [ darwin-cc ] - ++ [ stdenv.cc ] ++ lib.optionals useMusl [ musl-gcc ] + ++ [ stdenv.cc ] ); runtimeLibraryPath = lib.makeLibraryPath |