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