powersort/shell.nix

33 lines
763 B
Nix
Raw Normal View History

# Gradle's toolchain support does not work with IntelliJ, thus we have to use buildFHSUserEnv
# https://discourse.nixos.org/t/how-to-create-a-development-environment-with-intellij-idea-and-openjdk/10153
{
2024-12-30 16:09:20 +00:00
# NixOS stable
pkgs ? import <nixpkgs> {
# https://github.com/NixOS/nixpkgs/issues/166220#issuecomment-1745803058
config.allowUnfree = true;
2024-12-30 16:09:20 +00:00
},
# NixOS unstable
unstable ? import <unstable> {
# https://github.com/NixOS/nixpkgs/issues/166220#issuecomment-1745803058
config.allowUnfree = true;
}
}:
let
jdk = unstable.jdk23;
gradle = unstable.gradle;
in
(
pkgs.buildFHSUserEnv
{
name = "intellij-gradle-jdk23";
targetPkgs = pkgs_: [
pkgs_.jetbrains.idea-ultimate
jdk
gradle
];
}
).env