diff --git a/shell (Copy).nix b/shell (Copy).nix new file mode 100644 index 0000000..64f3dd9 --- /dev/null +++ b/shell (Copy).nix @@ -0,0 +1,19 @@ +{ pkgs ? import { } }: + +let + unstable = import (fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz) { }; + jdk = unstable.jdk23; +in + +# Open issue: gradle's toolchain support does not work with IntelliJ +# Solution from 2022 did no longer work: https://github.com/NixOS/nixpkgs/issues/207153#issue-1506967648 +# Instead we found this: https://discourse.nixos.org/t/overriding-the-jdk-for-gradle-in-a-nix-flake/36541/2 + +pkgs.mkShell { + buildInputs = with pkgs; [ + jdk + (callPackage gradle-packages.gradle_8 { + java = jdk; + }) + ]; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..b58c056 --- /dev/null +++ b/shell.nix @@ -0,0 +1,18 @@ +{ pkgs ? import { } }: + +let + unstable = import (fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz) { }; + toolchains = [ unstable.jdk23 ]; +in + +pkgs.mkShell { + nativeBuildInputs = [ + (unstable.gradle.overrideAttrs (curr: old: { + fixupPhase = '' + cat > $out/lib/gradle/gradle.properties <