From 7982c3423aec7a16375be5af20b0804bac25390a Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 3 Jan 2015 18:24:16 +0100 Subject: [PATCH] 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 --- pkgs/games/openarena/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/games/openarena/default.nix b/pkgs/games/openarena/default.nix index 7db727a13fd1..1926afaeb3b6 100644 --- a/pkgs/games/openarena/default.nix +++ b/pkgs/games/openarena/default.nix @@ -14,21 +14,21 @@ stdenv.mkDerivation rec { installPhase = let gameDir = "$out/openarena-$version"; - interpreter = "${stdenv.glibc}/lib/ld-linux*.so.?"; + interpreter = "$(< \"$NIX_CC/nix-support/dynamic-linker\")"; in '' mkdir -pv $out/bin cd $out unzip $src - if [ "${stdenv.system}" == "x86_64-linux" ]; then - patchelf --set-interpreter ${interpreter} ${gameDir}/openarena.x86_64 + ${if stdenv.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 : "${SDL}/lib:${libogg}/lib:${libvorbis}/lib" - else - patchelf --set-interpreter ${interpreter} ${gameDir}/openarena.i386 + '' else '' + patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.i386" makeWrapper "${gameDir}/openarena.i386" "$out/bin/openarena" \ --prefix LD_LIBRARY_PATH : "${SDL}/lib:${libogg}/lib:${libvorbis}/lib" - fi + ''} ''; meta = {