openarena: oa_ded link.

This commit is contained in:
Kevin Cox 2019-10-14 13:30:28 +01:00
parent 67effde499
commit 995fbac56f
No known key found for this signature in database
GPG Key ID: 9BB92CC1552E99AA

View File

@ -16,27 +16,28 @@ stdenv.mkDerivation {
gameDir = "$out/openarena-$version"; gameDir = "$out/openarena-$version";
interpreter = "$(< \"$NIX_CC/nix-support/dynamic-linker\")"; interpreter = "$(< \"$NIX_CC/nix-support/dynamic-linker\")";
libPath = stdenv.lib.makeLibraryPath [ SDL libglvnd libogg libvorbis curl openal ]; libPath = stdenv.lib.makeLibraryPath [ SDL libglvnd libogg libvorbis curl openal ];
arch = {
"x86_64-linux" = "x86_64";
"i386-linux" = "i386";
}.${stdenv.hostPlatform.system};
in '' in ''
mkdir -pv $out/bin mkdir -pv $out/bin
cd $out cd $out
unzip $src unzip $src
${if stdenv.hostPlatform.system == "x86_64-linux" then '' patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.${arch}"
patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.x86_64" patchelf --set-interpreter "${interpreter}" "${gameDir}/oa_ded.${arch}"
makeWrapper "${gameDir}/openarena.x86_64" "$out/bin/openarena" \
--prefix LD_LIBRARY_PATH : "${libPath}" makeWrapper "${gameDir}/openarena.${arch}" "$out/bin/openarena" \
'' else '' --prefix LD_LIBRARY_PATH : "${libPath}"
patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.i386" makeWrapper "${gameDir}/oa_ded.${arch}" "$out/bin/oa_ded"
makeWrapper "${gameDir}/openarena.i386" "$out/bin/openarena" \
--prefix LD_LIBRARY_PATH : "${libPath}"
''}
''; '';
meta = { meta = {
description = "Crossplatform openarena client"; description = "Crossplatform openarena client";
homepage = http://openarena.ws/; homepage = http://openarena.ws/;
maintainers = [ stdenv.lib.maintainers.wyvie ]; maintainers = [ stdenv.lib.maintainers.wyvie ];
platforms = stdenv.lib.platforms.linux; platforms = [ "i386-linux" "x86_64-linux" ];
license = stdenv.lib.licenses.gpl2; license = stdenv.lib.licenses.gpl2;
}; };
} }