mirror of
https://gitlab.uni-marburg.de/langbeid/powersort.git
synced 2025-01-21 19:50:35 +01:00
WIP: shell.nix
This commit is contained in:
parent
cc91066b05
commit
ca7f049c83
@ -16,6 +16,7 @@ Check which Java toolchains can be found by Gradle:
|
|||||||
- `shell1.nix` -> works 🥳
|
- `shell1.nix` -> works 🥳
|
||||||
- `shell2.nix` -> broken (as well for `gradle javaToolchains`)
|
- `shell2.nix` -> broken (as well for `gradle javaToolchains`)
|
||||||
- `shell3.nix` -> works 🥳
|
- `shell3.nix` -> works 🥳
|
||||||
|
- `shell4.nix` -> works 🥳
|
||||||
|
|
||||||
This should include version >= 17, e.g.:
|
This should include version >= 17, e.g.:
|
||||||
|
|
||||||
@ -40,13 +41,15 @@ Open issue: gradle's toolchain support does not work with IntelliJ
|
|||||||
- `shell2.nix`
|
- `shell2.nix`
|
||||||
- Another approach - which did no longer work! https://github.com/utybo/Tegral/blob/main/shell.nix
|
- Another approach - which did no longer work! https://github.com/utybo/Tegral/blob/main/shell.nix
|
||||||
- `shell3.nix`
|
- `shell3.nix`
|
||||||
- This works 🥳
|
- This works with JDK 21 🥳
|
||||||
- STRG ALT SHIFT s -> SDK -> add JDK ->
|
- STRG ALT SHIFT s -> SDK -> add JDK ->
|
||||||
- home path: /usr/lib/openjdk
|
- home path: /usr/lib/openjdk
|
||||||
- name: usr-lib-jdk
|
- name: usr-lib-jdk
|
||||||
- STRG ALT s -> build tools -> gradle ->
|
- STRG ALT s -> build tools -> gradle ->
|
||||||
- local installation: /usr/lib/gradle
|
- local installation: /usr/lib/gradle
|
||||||
- Gradle JVM: usr-lib-jdk
|
- Gradle JVM: usr-lib-jdk
|
||||||
|
- `shell4.nix`
|
||||||
|
- This works with JDK23 🚀
|
||||||
|
|
||||||
### Tasks
|
### Tasks
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ dependencies {
|
|||||||
// Apply a specific Java toolchain to ease working on different environments.
|
// Apply a specific Java toolchain to ease working on different environments.
|
||||||
java {
|
java {
|
||||||
toolchain {
|
toolchain {
|
||||||
languageVersion = JavaLanguageVersion.of(22)
|
languageVersion = JavaLanguageVersion.of(23)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
25
shell4.nix
Normal file
25
shell4.nix
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# 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;
|
||||||
|
}
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
unstable = import (fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz) { };
|
||||||
|
jdk = unstable.jdk23;
|
||||||
|
gradle = unstable.gradle;
|
||||||
|
in
|
||||||
|
|
||||||
|
(
|
||||||
|
pkgs.buildFHSUserEnv
|
||||||
|
{
|
||||||
|
name = "foo2";
|
||||||
|
targetPkgs = pkgs_: [
|
||||||
|
pkgs_.jetbrains.idea-ultimate
|
||||||
|
jdk
|
||||||
|
gradle
|
||||||
|
];
|
||||||
|
}
|
||||||
|
).env
|
Loading…
x
Reference in New Issue
Block a user