Sender | Message | Time |
---|---|---|
6 Jul 2024 | ||
Dennis | Hi! In NixOS, is there a way to install multiple JDKs next to each other, and have the "default" (providing the java command) selected by programs.java , but still be able to point some programs (like gradle ) to another JDK? | 20:15:17 |
Dennis | * Hi! In NixOS, is there a way to install multiple JDKs next to each other, and have the "default" (providing the I tried setting | 20:18:43 |
Infinidoge 🏳️⚧️ | To my knowledge, there unfortunately isn't a system to do this across a system environment | 20:23:29 |
Infinidoge 🏳️⚧️ | (Namely because you can only (really) have 1 copy of something in the path) | 20:24:25 |
Infinidoge 🏳️⚧️ | Multiple Java versions on Linux in other distros is kinda an illusion, in that they are just switching which version is properly installed though things like apt's alternatives, then setting a different JAVA_HOME | 20:25:07 |
Infinidoge 🏳️⚧️ | * Multiple Java versions on Linux in other distros is kinda an illusion, in that they are just switching which version is properly installed though things like apt's alternatives, then setting a different JAVA_HOME and PATH | 20:26:06 |
Infinidoge 🏳️⚧️ | If you want to have a different version for gradle in a project-specific manner, setting up a devshell would likely be the best option | 20:26:39 |
Dennis | Thanks! I just found https://github.com/NixOS/nixpkgs/pull/119444 and that seems to do the trick / work well enough for my specific use case. | 20:30:09 |
Infinidoge 🏳️⚧️ | Neat, good to know | 20:31:10 |
Dennis | Hm, the build succeeded, but now I have a different issue: Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: /home/[USER]/.openjfx/cache/21.0.1+6/amd64/libprism_es2.so: libXxf86vm.so.1: cannot open shared object file: No such file or directory .Any idea how to solve that? I guess if I could get it to use the NixOS OpenJFX... | 20:45:21 |
Infinidoge 🏳️⚧️ | Try adding xorg.libXxf86vm to your system packages | 20:48:27 |
Infinidoge 🏳️⚧️ | Using the Nixpkgs OpenJFX would be the better solution | 20:48:38 |
7 Jul 2024 | ||
Dennis | I do not know much about OpenJFX. How can I make gradle run run the application with a different OpenJFX implementation? Does that need modifications to the build.gradle script? | 00:18:25 |
Infinidoge 🏳️⚧️ | Unfortunately I don't know much about JFX either, so I'd have to do some tinkering to figure it out | 03:44:45 |
Infinidoge 🏳️⚧️ | (And I have a midterm Monday so unfortunately I don't have the time to dig into it at the moment) | 03:45:11 |
Dennis | Thanks! I found docs that seem promising: https://github.com/openjfx/javafx-gradle-plugin?tab=readme-ov-file#5-using-a-local-javafx-sdk However I noticed that after
Is this because I have no application installed that uses these packages? So Nix ignores | 14:20:04 |
Infinidoge 🏳️⚧️ | How- How did matrix put that message in between July 6th messages | 14:20:55 |
Infinidoge 🏳️⚧️ | Download SmartSelect_20240707_102112_SchildiChat.jpg | 14:21:32 |
Infinidoge 🏳️⚧️ | Download SmartSelect_20240707_102122_SchildiChat.jpg | 14:21:33 |
Infinidoge 🏳️⚧️ | In reply to @devurandom:matrix.orgMore specifically, it gets garbage collected because it isn't listed as a garbage collection root. I believe there is a nix store command to add it manually, or you can use something like system.extraDependencies to include it in your NixOS configuration | 14:23:42 |
Infinidoge 🏳️⚧️ | It's not an ideal solution, referring to nix store paths explicitly isn't generally recommended, but it does work at least | 14:24:31 |
Dennis | Thanks! Why did that not happen to other packages in systemPackages ? Because they install sth into /run/current-system ? | 14:25:12 |
Infinidoge 🏳️⚧️ | In reply to @devurandom:matrix.orgYes. Everything that is installed in the system is part of the "closure", which is marked as a garbage collection root, so it doesn't get cleaned up | 14:26:14 |
Infinidoge 🏳️⚧️ | (It wouldn't be very good if you garbage collected all of the stuff your system needed to run lol) | 14:26:34 |
Dennis | Sadly this does not work. The Gradle JavaFX plugin can take the path to the JavaFX SDK, but that SDK contains JARs and shared objects, while Maybe I have to write a Nix derivation to make this work? | 14:47:04 |
Dennis | * Sadly this does not work. The Gradle JavaFX plugin can take the path to the JavaFX SDK, but that SDK contains JARs and shared objects, while Maybe I have to write a Nix derivation to make this work? | 14:55:13 |
Dennis | * Sadly this does not work. The Gradle JavaFX plugin can take the path to the JavaFX SDK, but that SDK contains JARs and shared objects, while Maybe I have to write a Nix package to make this work? | 19:53:05 |
Dennis | Next attempt also failed. In my nixos config I am now at (gradle.override { javaToolchains = [ (jdk21.override { enableJavaFX = true; }) ]; }) , but when I pass sdk = ... to the javafx plugin in build.gradle , it tries to find javafx as JARs (to put them on the classpath?), while the JDK contains jmods. | 20:30:14 |
9 Jul 2024 | ||
sbc64 joined the room. | 16:48:46 | |
23 Jul 2024 | ||
Ezzobir Bezziou joined the room. | 08:20:04 |