Merge pull request #1441 from rszibele/xonotic

xonotic: compile the glx version and add a symlink to default to the sdl version.

+21 -5
+21 -5
pkgs/games/xonotic/default.nix
··· 1 - { stdenv, fetchurl, unzip, SDL, libjpeg, zlib, libvorbis, curl }: 1 + { stdenv, fetchurl 2 + , # required for both 3 + unzip, libjpeg, zlib, libvorbis, curl 4 + , # glx 5 + libX11, mesa, libXpm, libXext, libXxf86vm, alsaLib 6 + , # sdl 7 + SDL 8 + }: 2 9 3 10 stdenv.mkDerivation rec { 4 11 name = "xonotic-0.7.0"; ··· 8 15 sha256 = "21a5fb5493c269cd3843789cb8598f952d4196e8bc71804b9bd5808b646542c6"; 9 16 }; 10 17 11 - # Commented out things needed to build cl-release because of errors. 12 - #buildInputs = [ libX11 libXpm libXext xf86dgaproto libXxf86dga libXxf86vm mesa ]; 13 - buildInputs = [ unzip SDL libjpeg ]; 18 + buildInputs = [ 19 + # required for both 20 + unzip libjpeg 21 + # glx 22 + libX11 mesa libXpm libXext libXxf86vm alsaLib 23 + # sdl 24 + SDL 25 + ]; 14 26 15 27 sourceRoot = "Xonotic/source/darkplaces"; 16 28 ··· 27 39 28 40 buildPhase = '' 29 41 DP_FS_BASEDIR="$out/share/xonotic" 30 - #make DP_FS_BASEDIR=$DP_FS_BASEDIR cl-release 42 + make DP_FS_BASEDIR=$DP_FS_BASEDIR cl-release 31 43 make DP_FS_BASEDIR=$DP_FS_BASEDIR sdl-release 32 44 make DP_FS_BASEDIR=$DP_FS_BASEDIR sv-release 33 45 ''; ··· 36 48 mkdir -p "$out/bin" 37 49 cp darkplaces-dedicated "$out/bin/xonotic-dedicated" 38 50 cp darkplaces-sdl "$out/bin/xonotic-sdl" 51 + cp darkplaces-glx "$out/bin/xonotic-glx" 39 52 cd ../.. 40 53 mkdir -p "$out/share/xonotic" 41 54 mv data "$out/share/xonotic" 55 + 56 + # default to sdl 57 + ln -s "$out/bin/xonotic-sdl" "$out/bin/xonotic" 42 58 ''; 43 59 44 60 dontPatchELF = true;