nix: override msa id via cmake flag

This commit is contained in:
Mustafa Çalışkan 2022-05-27 22:31:25 +03:00
parent bfd9bd43c9
commit 338156500b

View File

@ -48,12 +48,6 @@ mkDerivation rec {
dontWrapQtApps = true; dontWrapQtApps = true;
postPatch = lib.optionalString (msaClientID != "") ''
# add client ID
substituteInPlace CMakeLists.txt \
--replace '17b47edd-c884-4997-926d-9e7f9a6b4647' '${msaClientID}'
'';
postUnpack = '' postUnpack = ''
# Copy libnbtplusplus # Copy libnbtplusplus
rm -rf source/libraries/libnbtplusplus rm -rf source/libraries/libnbtplusplus
@ -65,7 +59,7 @@ mkDerivation rec {
cmakeFlags = [ cmakeFlags = [
"-GNinja" "-GNinja"
"-DLauncher_PORTABLE=OFF" "-DLauncher_PORTABLE=OFF"
]; ] ++ lib.optionals (msaClientID != "") [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ];
postInstall = '' postInstall = ''
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128 # xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128