polymc: 1.3.1 -> 1.3.2
This commit is contained in:
parent
b319b5eb26
commit
68c360c518
1 changed files with 10 additions and 17 deletions
|
@ -1,12 +1,12 @@
|
||||||
{ lib
|
{ lib
|
||||||
, mkDerivation
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, cmake
|
, cmake
|
||||||
, jdk8
|
, jdk8
|
||||||
, jdk
|
, jdk
|
||||||
, zlib
|
, zlib
|
||||||
, file
|
, file
|
||||||
, makeWrapper
|
, wrapQtAppsHook
|
||||||
, xorg
|
, xorg
|
||||||
, libpulseaudio
|
, libpulseaudio
|
||||||
, qtbase
|
, qtbase
|
||||||
|
@ -15,32 +15,25 @@
|
||||||
, glfw
|
, glfw
|
||||||
, openal
|
, openal
|
||||||
, msaClientID ? ""
|
, msaClientID ? ""
|
||||||
|
, jdks ? [ jdk jdk8 ]
|
||||||
}:
|
}:
|
||||||
|
|
||||||
mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "polymc";
|
pname = "polymc";
|
||||||
version = "1.3.1";
|
version = "1.3.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "PolyMC";
|
owner = "PolyMC";
|
||||||
repo = "PolyMC";
|
repo = "PolyMC";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-oTzhKGDi1Kr3JXY9dYQf1rVDPFr52tJ7L+rb5LCbtBE=";
|
sha256 = "sha256-hqsyS82UzgCUZ9HjoPKjOLE49fwLntRAh3mVrTsmi3o=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake file jdk makeWrapper ];
|
nativeBuildInputs = [ cmake file jdk wrapQtAppsHook ];
|
||||||
buildInputs = [ qtbase zlib quazip ];
|
buildInputs = [ qtbase zlib quazip ];
|
||||||
|
|
||||||
postPatch = ''
|
cmakeFlags = lib.optionals (msaClientID != "") [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ];
|
||||||
# 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")'
|
|
||||||
'';
|
|
||||||
|
|
||||||
cmakeFlags = [ "-DLauncher_PORTABLE=0" ] ++
|
|
||||||
lib.optionals (msaClientID != "") [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ];
|
|
||||||
|
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
|
@ -58,9 +51,9 @@ mkDerivation rec {
|
||||||
];
|
];
|
||||||
in ''
|
in ''
|
||||||
# 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
|
||||||
wrapProgram $out/bin/polymc \
|
wrapQtApp $out/bin/polymc \
|
||||||
"''${qtWrapperArgs[@]}" \
|
|
||||||
--set GAME_LIBRARY_PATH /run/opengl-driver/lib:${libpath} \
|
--set GAME_LIBRARY_PATH /run/opengl-driver/lib:${libpath} \
|
||||||
|
--prefix POLYMC_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks} \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
|
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue