diff options
Diffstat (limited to 'pkgs/development/compilers/graalvm/community-edition/truffleruby.nix')
-rw-r--r-- | pkgs/development/compilers/graalvm/community-edition/truffleruby.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/compilers/graalvm/community-edition/truffleruby.nix b/pkgs/development/compilers/graalvm/community-edition/truffleruby.nix new file mode 100644 index 0000000000000..bb4a00325b7d4 --- /dev/null +++ b/pkgs/development/compilers/graalvm/community-edition/truffleruby.nix @@ -0,0 +1,37 @@ +{ lib +, stdenv +, graalvmCEPackages +, libyaml +, openssl +, src +, version +}: + +graalvmCEPackages.buildGraalvmProduct { + inherit src version; + product = "truffleruby"; + + extraBuildInputs = [ + libyaml + openssl + ]; + + preFixup = lib.optionalString stdenv.isLinux '' + patchelf $out/lib/mri/openssl.so \ + --replace-needed libssl.so.10 libssl.so \ + --replace-needed libcrypto.so.10 libcrypto.so + ''; + + doInstallCheck = true; + installCheckPhase = '' + echo "Testing TruffleRuby" + # Fixup/silence warnings about wrong locale + export LANG=C + export LC_ALL=C + $out/bin/ruby -e 'puts(1 + 1)' + ${# broken in darwin with sandbox enabled + lib.optionalString stdenv.isLinux '' + echo '1 + 1' | $out/bin/irb + ''} + ''; +} |