use newer tag for prism-launcher
This commit is contained in:
parent
2685b61d08
commit
6cae5bcf25
4 changed files with 256 additions and 1 deletions
133
packages/prismlauncher-master/package.nix
Normal file
133
packages/prismlauncher-master/package.nix
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
{
|
||||
addDriverRunpath,
|
||||
alsa-lib,
|
||||
flite,
|
||||
gamemode,
|
||||
glfw3-minecraft,
|
||||
jdk17,
|
||||
jdk21,
|
||||
jdk8,
|
||||
kdePackages,
|
||||
lib,
|
||||
libGL,
|
||||
libX11,
|
||||
libXcursor,
|
||||
libXext,
|
||||
libXrandr,
|
||||
libXxf86vm,
|
||||
libjack2,
|
||||
libpulseaudio,
|
||||
libusb1,
|
||||
mesa-demos,
|
||||
openal,
|
||||
pciutils,
|
||||
pipewire,
|
||||
prismlauncher-unwrapped-master,
|
||||
stdenv,
|
||||
symlinkJoin,
|
||||
udev,
|
||||
vulkan-loader,
|
||||
xrandr,
|
||||
|
||||
additionalLibs ? [ ],
|
||||
additionalPrograms ? [ ],
|
||||
controllerSupport ? stdenv.hostPlatform.isLinux,
|
||||
gamemodeSupport ? stdenv.hostPlatform.isLinux,
|
||||
jdks ? [
|
||||
jdk21
|
||||
jdk17
|
||||
jdk8
|
||||
],
|
||||
msaClientID ? null,
|
||||
textToSpeechSupport ? stdenv.hostPlatform.isLinux,
|
||||
}:
|
||||
|
||||
assert lib.assertMsg (
|
||||
controllerSupport -> stdenv.hostPlatform.isLinux
|
||||
) "controllerSupport only has an effect on Linux.";
|
||||
|
||||
assert lib.assertMsg (
|
||||
textToSpeechSupport -> stdenv.hostPlatform.isLinux
|
||||
) "textToSpeechSupport only has an effect on Linux.";
|
||||
|
||||
let
|
||||
prismlauncher' = prismlauncher-unwrapped-master.override { inherit msaClientID gamemodeSupport; };
|
||||
in
|
||||
|
||||
symlinkJoin {
|
||||
name = "prismlauncher-${prismlauncher'.version}";
|
||||
|
||||
paths = [ prismlauncher' ];
|
||||
|
||||
nativeBuildInputs = [ kdePackages.wrapQtAppsHook ];
|
||||
|
||||
buildInputs = [
|
||||
kdePackages.qtbase
|
||||
kdePackages.qtsvg
|
||||
]
|
||||
++ lib.optional (
|
||||
lib.versionAtLeast kdePackages.qtbase.version "6" && stdenv.hostPlatform.isLinux
|
||||
) kdePackages.qtwayland;
|
||||
|
||||
postBuild = ''
|
||||
wrapQtAppsHook
|
||||
'';
|
||||
|
||||
qtWrapperArgs =
|
||||
let
|
||||
runtimeLibs = [
|
||||
(lib.getLib stdenv.cc.cc)
|
||||
## native versions
|
||||
glfw3-minecraft
|
||||
openal
|
||||
|
||||
## openal
|
||||
alsa-lib
|
||||
libjack2
|
||||
libpulseaudio
|
||||
pipewire
|
||||
|
||||
## glfw
|
||||
libGL
|
||||
libX11
|
||||
libXcursor
|
||||
libXext
|
||||
libXrandr
|
||||
libXxf86vm
|
||||
|
||||
udev # oshi
|
||||
|
||||
vulkan-loader # VulkanMod's lwjgl
|
||||
]
|
||||
++ lib.optional textToSpeechSupport flite
|
||||
++ lib.optional gamemodeSupport gamemode.lib
|
||||
++ lib.optional controllerSupport libusb1
|
||||
++ additionalLibs;
|
||||
|
||||
runtimePrograms = [
|
||||
mesa-demos
|
||||
pciutils # need lspci
|
||||
xrandr # needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
||||
]
|
||||
++ additionalPrograms;
|
||||
|
||||
in
|
||||
[ "--prefix PRISMLAUNCHER_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks}" ]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
"--set LD_LIBRARY_PATH ${addDriverRunpath.driverLink}/lib:${lib.makeLibraryPath runtimeLibs}"
|
||||
"--prefix PATH : ${lib.makeBinPath runtimePrograms}"
|
||||
];
|
||||
|
||||
meta = {
|
||||
inherit (prismlauncher'.meta)
|
||||
description
|
||||
longDescription
|
||||
homepage
|
||||
changelog
|
||||
license
|
||||
maintainers
|
||||
mainProgram
|
||||
platforms
|
||||
;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue