Closed pshirshov closed 1 year ago
Yes, we did the same for the native-image IIRC, we need to do the same for js
Ideally this should be user-configurable. E.g.graaalvm node binary may cause a lot of issues and many devs would be happy to op out of having it installed.
We need to refactor the GraalVM to add all products as separate derivations, and merge them using something like symlinkJoin
in one unique output.
I kinda have an idea on how to do it, however have zero energy to do it right now.
I'm having this issue with graalvm11-ce
anyone knows how to fix it? or maybe at least a workaround for this error?
Take a look at https://github.com/NixOS/nixpkgs/pull/209060
You can then generate your own graalvm11-ce-sources.json
with the js product and add it to sourcesPath
in mkGraal
Sorry, forgot to mention that I'm having this issue when I try to install native-image
:stuck_out_tongue:
After #216228 is merged, this will be possible:
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
(graalvm11-ce.override {
products = with graalvmCEPackages; [
js-installable-svm-java11
llvm-installable-svm-java11
native-image-installable-svm-java11
python-installable-svm-java11
ruby-installable-svm-java11
wasm-installable-svm-java11
];
})
];
}
To add a new product should be fairly simple. You can see this commit for a simple example: https://github.com/NixOS/nixpkgs/pull/216228/commits/19e4e0a5e9465de8a60e7b62a37fa97d2dc06087.
The basic idea is to add the new product in products_url
inside the update.sh
script, run it with FORCE=1 ./update.sh
to force it to rerun, generate a new hashes.nix
file and create a derivation using the buildGraalvmProduct
to allow it to be composed with the main graalvm*-ce
derivations.
I am closing this issue now that #216228 is merged. If this is still an issue, please re-open this issue.
It seems like this is not possible anymore?..
By the way, I made the legacy formulas available as nur packages: https://github.com/7mind/7mind-nix
Many things are broken on modern JDKs (notably the hadoop libraries), so this might be required for a while.
Probably that should be somehow done in the formula itself