mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 04:12:44 +03:00
openarena: Clean up and fix tarball evaluation.
It really doesn't make sense to pass stdenv.system to the builder and check the value during build process. Also, we're now using $NIX_CC/nix-support/dynamic-linker instead of pattern matching on ld-linux*.so.?. This is part of an attempt to fix nixpkgs tarball evaluation. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
840f9b419c
commit
7982c3423a
@ -14,21 +14,21 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
installPhase = let
|
installPhase = let
|
||||||
gameDir = "$out/openarena-$version";
|
gameDir = "$out/openarena-$version";
|
||||||
interpreter = "${stdenv.glibc}/lib/ld-linux*.so.?";
|
interpreter = "$(< \"$NIX_CC/nix-support/dynamic-linker\")";
|
||||||
in ''
|
in ''
|
||||||
mkdir -pv $out/bin
|
mkdir -pv $out/bin
|
||||||
cd $out
|
cd $out
|
||||||
unzip $src
|
unzip $src
|
||||||
|
|
||||||
if [ "${stdenv.system}" == "x86_64-linux" ]; then
|
${if stdenv.system == "x86_64-linux" then ''
|
||||||
patchelf --set-interpreter ${interpreter} ${gameDir}/openarena.x86_64
|
patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.x86_64"
|
||||||
makeWrapper "${gameDir}/openarena.x86_64" "$out/bin/openarena" \
|
makeWrapper "${gameDir}/openarena.x86_64" "$out/bin/openarena" \
|
||||||
--prefix LD_LIBRARY_PATH : "${SDL}/lib:${libogg}/lib:${libvorbis}/lib"
|
--prefix LD_LIBRARY_PATH : "${SDL}/lib:${libogg}/lib:${libvorbis}/lib"
|
||||||
else
|
'' else ''
|
||||||
patchelf --set-interpreter ${interpreter} ${gameDir}/openarena.i386
|
patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.i386"
|
||||||
makeWrapper "${gameDir}/openarena.i386" "$out/bin/openarena" \
|
makeWrapper "${gameDir}/openarena.i386" "$out/bin/openarena" \
|
||||||
--prefix LD_LIBRARY_PATH : "${SDL}/lib:${libogg}/lib:${libvorbis}/lib"
|
--prefix LD_LIBRARY_PATH : "${SDL}/lib:${libogg}/lib:${libvorbis}/lib"
|
||||||
fi
|
''}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
Loading…
Reference in New Issue
Block a user