mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 09:14:28 +00:00
openarena: oa_ded link.
This commit is contained in:
parent
67effde499
commit
995fbac56f
@ -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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user