mirror of
https://gitlab.uni-marburg.de/langbeid/powersort.git
synced 2025-01-22 19:55:44 +01:00
WIP: shell.nix
This commit is contained in:
parent
b8c1b79916
commit
77037c13d5
13
README.md
13
README.md
@ -13,8 +13,9 @@ Check which Java toolchains can be found by Gradle:
|
||||
```
|
||||
|
||||
- `shell.nix` -> broken (as well for `gradle javaToolchains`
|
||||
- `shell1.nix` -> works
|
||||
- `shell1.nix` -> works 🥳
|
||||
- `shell2.nix` -> broken (as well for `gradle javaToolchains`)
|
||||
- `shell3.nix` -> works 🥳
|
||||
|
||||
This should include version >= 17, e.g.:
|
||||
|
||||
@ -30,8 +31,6 @@ This should include version >= 17, e.g.:
|
||||
|
||||
**IntelliJ**
|
||||
|
||||
TODO, nothing has worked so far.
|
||||
|
||||
Open issue: gradle's toolchain support does not work with IntelliJ
|
||||
|
||||
- `shell.nix`
|
||||
@ -40,6 +39,14 @@ Open issue: gradle's toolchain support does not work with IntelliJ
|
||||
- Instead, we found this: https://discourse.nixos.org/t/overriding-the-jdk-for-gradle-in-a-nix-flake/36541/2
|
||||
- `shell2.nix`
|
||||
- Another approach - which did no longer work! https://github.com/utybo/Tegral/blob/main/shell.nix
|
||||
- `shell3.nix`
|
||||
- This works 🥳
|
||||
- STRG ALT SHIFT s -> SDK -> add JDK ->
|
||||
- home path: /usr/lib/openjdk
|
||||
- name: usr-lib-jdk
|
||||
- STRG ALT s -> build tools -> gradle ->
|
||||
- local installation: /usr/lib/gradle
|
||||
- Gradle JVM: usr-lib-jdk
|
||||
|
||||
### Tasks
|
||||
|
||||
|
@ -28,7 +28,7 @@ dependencies {
|
||||
// Apply a specific Java toolchain to ease working on different environments.
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
languageVersion = JavaLanguageVersion.of(22)
|
||||
}
|
||||
}
|
||||
|
||||
|
22
shell3.nix
Normal file
22
shell3.nix
Normal file
@ -0,0 +1,22 @@
|
||||
# https://discourse.nixos.org/t/how-to-create-a-development-environment-with-intellij-idea-and-openjdk/10153
|
||||
{
|
||||
pkgs ? import <nixpkgs> {
|
||||
# https://github.com/NixOS/nixpkgs/issues/166220#issuecomment-1745803058
|
||||
config.allowUnfree = true;
|
||||
}
|
||||
}:
|
||||
(
|
||||
pkgs.buildFHSUserEnv
|
||||
{
|
||||
name = "foo";
|
||||
targetPkgs = pkgs:
|
||||
[
|
||||
pkgs.jetbrains.idea-ultimate
|
||||
|
||||
# Gradle 8.7 is configured for JDK 21
|
||||
pkgs.jdk
|
||||
pkgs.gradle
|
||||
|
||||
];
|
||||
}
|
||||
).env
|
Loading…
x
Reference in New Issue
Block a user