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
e57ca4030d
commit
21012c1c2b
19
shell (Copy).nix
Normal file
19
shell (Copy).nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
|
||||||
|
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;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
18
shell.nix
Normal file
18
shell.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
|
||||||
|
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 <<EOF
|
||||||
|
org.gradle.java.installations.paths=${pkgs.lib.concatStringsSep "," toolchains}
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
}))
|
||||||
|
];
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user