powersort/shell.nix

28 lines
682 B
Nix
Raw Normal View History

2024-11-23 16:52:35 +00:00
# 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
{
pkgs ? import <nixpkgs> {
# https://github.com/NixOS/nixpkgs/issues/166220#issuecomment-1745803058
config.allowUnfree = true;
}
}:
2024-11-19 19:17:15 +01:00
let
unstable = import (fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz) { };
2024-11-23 16:52:35 +00:00
jdk = unstable.jdk23;
gradle = unstable.gradle;
2024-11-19 19:17:15 +01:00
in
2024-11-23 16:52:35 +00:00
(
pkgs.buildFHSUserEnv
{
name = "intellij-gradle-jdk23";
targetPkgs = pkgs_: [
pkgs_.jetbrains.idea-ultimate
jdk
gradle
];
}
).env