build: make use of only one nix shell with both java 8 and 21 in env

This commit is contained in:
HerozDotExe 2026-03-26 19:22:58 +01:00
parent eb380f9403
commit e40bd75ab1
3 changed files with 3 additions and 95 deletions

View file

@ -46,4 +46,7 @@ pkgs.mkShell {
flite # Text to speech (Otherwise minecraft will log an error every time it launches)
]
);
j8 = pkgs.jre8 + "/bin/java";
j21 = pkgs.jdk21 + "/bin/java";
}

View file

@ -1,47 +0,0 @@
# modified version of https://github.com/Tomate0613/launcher-core/blob/main/flake.nix (https://github.com/Tomate0613/launcher-core/blob/abffd112adea4586b4041aad4412f14e2c5c3047/flake.nix)
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell {
# Java
packages = with pkgs; [
jdk21
];
# Env
__GL_THREADED_OPTIMIZATIONS = 0;
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (
with pkgs;
[
(lib.getLib stdenv.cc.cc)
## native versions
glfw3-minecraft
openal
## openal
alsa-lib
libjack2
libpulseaudio
pipewire
## glfw
libGL
libx11
libxcursor
libxext
libxrandr
libxxf86vm
## Old minecraft (pre-1.8)
libxrender
libxtst
libxi
udev # oshi
flite # Text to speech (Otherwise minecraft will log an error every time it launches)
]
);
}

View file

@ -1,48 +0,0 @@
# modified version of https://github.com/Tomate0613/launcher-core/blob/main/flake.nix (https://github.com/Tomate0613/launcher-core/blob/abffd112adea4586b4041aad4412f14e2c5c3047/flake.nix)
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell {
# Java
packages = with pkgs; [
jre8
xrandr
];
# Env
__GL_THREADED_OPTIMIZATIONS = 0;
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (
with pkgs;
[
(lib.getLib stdenv.cc.cc)
## native versions
glfw3-minecraft
openal
## openal
alsa-lib
libjack2
libpulseaudio
pipewire
## glfw
libGL
libx11
libxcursor
libxext
libxrandr
libxxf86vm
## Old minecraft (pre-1.8)
libxrender
libxtst
libxi
udev # oshi
flite # Text to speech (Otherwise minecraft will log an error every time it launches)
]
);
}