1 { lib, fetchurl, makeWrapper, patchelf, pkgs, stdenv, SDL, libglvnd, libogg, libvorbis, curl, openal }:
8 name = "openarena.zip";
9 url = "http://openarena.ws/request.php?4";
10 sha256 = "0jmc1cmdz1rcvqc9ilzib1kilpwap6v0d331l6q53wsibdzsz3ss";
13 nativeBuildInputs = [ pkgs.unzip patchelf makeWrapper];
16 gameDir = "$out/openarena-$version";
17 interpreter = "$(< \"$NIX_CC/nix-support/dynamic-linker\")";
18 libPath = lib.makeLibraryPath [ SDL libglvnd libogg libvorbis curl openal ];
20 "x86_64-linux" = "x86_64";
21 "i386-linux" = "i386";
22 }.${stdenv.hostPlatform.system};
28 patchelf --set-interpreter "${interpreter}" "${gameDir}/openarena.${arch}"
29 patchelf --set-interpreter "${interpreter}" "${gameDir}/oa_ded.${arch}"
31 makeWrapper "${gameDir}/openarena.${arch}" "$out/bin/openarena" \
32 --prefix LD_LIBRARY_PATH : "${libPath}"
33 makeWrapper "${gameDir}/oa_ded.${arch}" "$out/bin/oa_ded"
37 description = "Crossplatform openarena client";
38 homepage = "http://openarena.ws/";
39 maintainers = [ lib.maintainers.wyvie ];
40 platforms = [ "i386-linux" "x86_64-linux" ];
41 license = lib.licenses.gpl2;