nix: package fixup

This commit is contained in:
cidkidnix
2022-01-09 12:00:37 -06:00
parent 541f26b33a
commit 92872e957b
2 changed files with 62 additions and 0 deletions

View File

@ -13,6 +13,7 @@
, libpulseaudio
, qtbase
, libGL
, msaClientID ? ""
# flake
, self
@ -47,6 +48,19 @@ mkDerivation rec {
dontWrapQtApps = true;
patches = [ ./0001-pick-latest-java-first.patch ];
postPatch = ''
# hardcode jdk paths
substituteInPlace launcher/java/JavaUtils.cpp \
--replace 'scanJavaDir("/usr/lib/jvm")' 'javas.append("${jdk}/lib/openjdk/bin/java")' \
--replace 'scanJavaDir("/usr/lib32/jvm")' 'javas.append("${jdk8}/lib/openjdk/bin/java")'
'' + lib.optionalString (msaClientID != "") ''
# add client ID
substituteInPlace CMakeLists.txt \
--replace '17b47edd-c884-4997-926d-9e7f9a6b4647' '${msaClientID}'
'';
postUnpack = ''
# Copy submodules inputs
rm -rf source/libraries/{libnbtplusplus,quazip}