mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
openarena: oa_ded link.
This commit is contained in:
parent
67effde499
commit
995fbac56f
@ -16,27 +16,28 @@ stdenv.mkDerivation {
|
||||
gameDir = "$out/openarena-$version";
|
||||
interpreter = "$(< \"$NIX_CC/nix-support/dynamic-linker\")";
|
||||
libPath = stdenv.lib.makeLibraryPath [ SDL libglvnd libogg libvorbis curl openal ];
|
||||
arch = {
|
||||
"x86_64-linux" = "x86_64";
|
||||
"i386-linux" = "i386";
|
||||
}.${stdenv.hostPlatform.system};
|
||||
in ''
|
||||
mkdir -pv $out/bin
|
||||
cd $out
|
||||
unzip $src
|
||||
|
||||
${if stdenv.hostPlatform.system == "x86_64-linux" then ''
|
||||
patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.x86_64"
|
||||
makeWrapper "${gameDir}/openarena.x86_64" "$out/bin/openarena" \
|
||||
--prefix LD_LIBRARY_PATH : "${libPath}"
|
||||
'' else ''
|
||||
patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.i386"
|
||||
makeWrapper "${gameDir}/openarena.i386" "$out/bin/openarena" \
|
||||
--prefix LD_LIBRARY_PATH : "${libPath}"
|
||||
''}
|
||||
patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.${arch}"
|
||||
patchelf --set-interpreter "${interpreter}" "${gameDir}/oa_ded.${arch}"
|
||||
|
||||
makeWrapper "${gameDir}/openarena.${arch}" "$out/bin/openarena" \
|
||||
--prefix LD_LIBRARY_PATH : "${libPath}"
|
||||
makeWrapper "${gameDir}/oa_ded.${arch}" "$out/bin/oa_ded"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Crossplatform openarena client";
|
||||
homepage = http://openarena.ws/;
|
||||
maintainers = [ stdenv.lib.maintainers.wyvie ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
platforms = [ "i386-linux" "x86_64-linux" ];
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user