about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-10-20 22:09:03 +0000
committerAlyssa Ross <hi@alyssa.is>2023-10-20 22:09:03 +0000
commit50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e (patch)
treef2556b911180125ccbb7ed0e78a54e92da89adce /nixpkgs/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix
parent4c16d4548a98563c9d9ad76f4e5b2202864ccd54 (diff)
parentcfc75eec4603c06503ae750f88cf397e00796ea8 (diff)
downloadnixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.gz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.bz2
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.lz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.xz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.zst
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.zip
Merge commit 'cfc75eec4603c06503ae750f88cf397e00796ea8'
Conflicts:
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix')
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix60
1 files changed, 0 insertions, 60 deletions
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix b/nixpkgs/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix
deleted file mode 100644
index 427c5ffef5b5..000000000000
--- a/nixpkgs/pkgs/development/compilers/graalvm/community-edition/native-image-installable-svm.nix
+++ /dev/null
@@ -1,60 +0,0 @@
-{ lib
-, stdenv
-, graalvmCEPackages
-, gcc
-, glibc
-, javaVersion
-, musl
-, src
-, version
-, writeShellScriptBin
-, zlib
-, useMusl ? false
-, extraCLibs ? [ ]
-}:
-
-assert useMusl -> stdenv.isLinux;
-let
-  cLibs = [ glibc zlib.static ]
-    ++ lib.optionals (!useMusl) [ glibc.static ]
-    ++ lib.optionals useMusl [ musl ]
-    ++ extraCLibs;
-  # 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 "$@"'');
-  binPath = lib.makeBinPath ([ gcc ] ++ lib.optionals useMusl [ musl-gcc ]);
-in
-graalvmCEPackages.buildGraalvmProduct rec {
-  inherit src javaVersion version;
-  product = "native-image-installable-svm";
-
-  graalvmPhases.postInstall = lib.optionalString stdenv.isLinux ''
-    wrapProgram $out/bin/native-image \
-      --prefix PATH : ${binPath} \
-      ${lib.concatStringsSep " "
-        (map (l: "--add-flags '-H:CLibraryPath=${l}/lib'") cLibs)}
-  '';
-
-  graalvmPhases.installCheckPhase = ''
-    echo "Ahead-Of-Time compilation"
-    $out/bin/native-image -H:-CheckToolchain -H:+ReportExceptionStackTraces HelloWorld
-    ./helloworld | fgrep 'Hello World'
-
-    ${# --static is only available in Linux
-      lib.optionalString (stdenv.isLinux && !useMusl) ''
-      echo "Ahead-Of-Time compilation with -H:+StaticExecutableWithDynamicLibC"
-      $out/bin/native-image -H:+StaticExecutableWithDynamicLibC HelloWorld
-      ./helloworld | fgrep 'Hello World'
-
-      echo "Ahead-Of-Time compilation with --static"
-      $out/bin/native-image --static HelloWorld
-      ./helloworld | fgrep 'Hello World'
-    ''}
-
-    ${# --static is only available in Linux
-      lib.optionalString (stdenv.isLinux && useMusl) ''
-      echo "Ahead-Of-Time compilation with --static and --libc=musl"
-      $out/bin/native-image --static HelloWorld --libc=musl
-      ./helloworld | fgrep 'Hello World'
-    ''}
-  '';
-}