In #168816, we removed support for Python/Ruby/WASM to reduce the
support burden of GraalVM languages that, arguably, are not really being
used.
However, the way that `pkgs.graalvmCEPackages.mkGraal` function works
right now doesn't allow passing a custom sources file, that would allow
someone to compile GraalVM with the additional products (e.g.: Python).
This PR adds this possibility.
So if someone wants to create a custom graalvm11-ce derivation with
Python support, for example, they can do something like this:
```nix
let
graalvm11-ce-custom = pkgs.graalvmCEPackages.mkGraal {
config = {
x86_64-linux = {
products = [ "graalvm-ce" "python-installable-svm" ];
arch = "linux-amd64";
};
};
defaultVersion = "22.0.0.2";
javaVersion = "11";
platforms = "x86_64-linux";
sourcesPath = /home/someone/graalvm11-ce-sources.json;
};
in
{
environment.systemPackages = [ graalvm11-ce-custom ];
}
```
Those additional languages does not seem to really have much usage
(e.g.: none in nixpkgs). For example, Ruby is pretty much broken for all
environments for quite sometime already, however nobody seemed to border
enough to fix it. They also add a good amount of size to the derivation.
So let's remove them. It should be really easy if someone still cares
for them and want to add them back on their own system: just use the
`mkGraal` function (that we export) to generate their own version of
GraalVM with all extra features they want.
This package was last updated in 2020. It is out-of-date compared to
upstream and we have the graalvmXX-ce already, that is much better
maintained nowadays.
- Remove some unnecessary macOS dependencies (e.g.: GTK3 support)
- Patch openssl.so's Ruby libraries so autoPatchelfIgnoreMissingDeps is
not needed anymore on Linux
- Add support for musl
- Add binutils/stdenv.cc to runtime, making this derivation pure
(it used to depend on GCC installed in system)
- Format file with nixpkgs-fmt
- Drop graalvm8 since it was removed by upstream
- Add update.sh script to make it easier to generate hashes for all
platforms
- Fix GraalPython, broken since #141825 (sorry)
- Small refactorings and fixes
Only adding support for graalvm11-ce. While there is a graalvm8 release
for aarch64-linux, it is missing some support (like wasm).
Also, it is not used anywhere on the nixpkgs, while graalvm11 is used by
multiple other packages (babashka, clj-kondo, clojure-lsp, etc.).
This derivation was not updated since Jan 18, 2020. It doesn't
build on Hydra because it needs too much memory (~30GB). And no other
packages depend on it.
Also, this is a very complex package and really difficult to maintain.
It is a blocker for https://github.com/NixOS/nixpkgs/pull/141794, since
a recent bump of broke it.
`graalvm8-ce` is the replacement. It is much more up-to-date (`graalvm`
is on version 19.2.1, `graalvm8-ce` is on version 21.2.0), it is much
easier on Hydra (it uses the binary from Oracle).
I also deprecated `jvmci8` and `mx`. I am not sure if `graalvm8`
supplies them, but if something is missing we can always add it later to
`graalvm8-ce`.
Add dynamic libraries (for now only glibc) to $lib output, so we can use
them with e.g.:
```
native-image -H:CLibraryPath=${graalvm11-ce.lib}/lib ...
```
Reducing the finaly closure size of a GraalVM package since it will not
pull the whole GraalVM as a direct dependency.