diff options
author | Dr Perceptron <92106371+drperceptron@users.noreply.github.com> | 2022-04-03 16:51:30 +1000 |
---|---|---|
committer | Dr Perceptron <92106371+drperceptron@users.noreply.github.com> | 2022-04-03 17:13:52 +1000 |
commit | 4565febba8250c2e830e932279be21915fcab8cf (patch) | |
tree | 986014e7311f93c918b474edcf2aed162053847c /pkgs/games/quake3 | |
parent | 3630f5619a59e39acfdbc53975fe18f87b941500 (diff) |
quake3e: 2020-04-04 -> 2022-04-01-dev
Diffstat (limited to 'pkgs/games/quake3')
-rw-r--r-- | pkgs/games/quake3/quake3e/default.nix | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/pkgs/games/quake3/quake3e/default.nix b/pkgs/games/quake3/quake3e/default.nix index 7a1da6f6398c0..2346e6022d94f 100644 --- a/pkgs/games/quake3/quake3e/default.nix +++ b/pkgs/games/quake3/quake3e/default.nix @@ -1,31 +1,44 @@ -{ lib, stdenv, curl, libGL, libX11, libXxf86dga, alsa-lib, libXrandr, libXxf86vm, libXext, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub, makeWrapper +, curl, libGL, libX11, libXxf86dga, alsa-lib, libXrandr, libXxf86vm, libXext, SDL2, glibc +}: stdenv.mkDerivation rec { pname = "Quake3e"; - version = "2020-04-04"; + version = "2022-04-01-dev"; src = fetchFromGitHub { owner = "ec-"; repo = pname; - rev = version; - sha256 = "1jvk8qd0mi0x8lslknhkfd8h6ridwca34c6qahsbmmpcgsvdv16s"; + rev = "c6cec00b858aa5955eb1d6eb65b9bfd41fd869cb"; + sha256 = "0qd13fndbhgkkmhxbprpzmj2l2v9ihacxagpdqi9sg9nrzvahr9h"; }; - buildInputs = [ curl libGL libX11 libXxf86dga alsa-lib libXrandr libXxf86vm libXext ]; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ curl libGL libX11 libXxf86dga alsa-lib libXrandr libXxf86vm libXext SDL2 glibc ]; + NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2"; enableParallelBuilding = true; postPatch = '' sed -i -e 's#OpenGLLib = dlopen( dllname#OpenGLLib = dlopen( "${libGL}/lib/libGL.so"#' code/unix/linux_qgl.c + sed -i -e 's#Sys_LoadLibrary( "libpthread.so.0" )#Sys_LoadLibrary( "${glibc}/lib/libpthread.so.0" )#' code/unix/linux_snd.c sed -i -e 's#Sys_LoadLibrary( "libasound.so.2" )#Sys_LoadLibrary( "${alsa-lib}/lib/libasound.so.2" )#' code/unix/linux_snd.c + sed -i -e 's#Sys_LoadLibrary( "libXxf86dga.so.1" )#Sys_LoadLibrary( "${libXxf86dga}/lib/libXxf86dga.so.1" )#' code/unix/x11_dga.c sed -i -e 's#Sys_LoadLibrary( "libXrandr.so.2" )#Sys_LoadLibrary( "${libXrandr}/lib/libXrandr.so.2" )#' code/unix/x11_randr.c sed -i -e 's#Sys_LoadLibrary( "libXxf86vm.so.1" )#Sys_LoadLibrary( "${libXxf86vm}/lib/libXxf86vm.so.1" )#' code/unix/x11_randr.c - sed -i -e 's#Sys_LoadLibrary( "libXxf86dga.so.1" )#Sys_LoadLibrary( "${libXxf86dga}/lib/libXxf86dga.so.1" )#' code/unix/x11_dga.c + sed -i -e 's#Sys_LoadLibrary( "libXxf86vm.so.1" )#Sys_LoadLibrary( "${libXxf86vm}/lib/libXxf86vm.so.1" )#' code/unix/x11_vidmode.c sed -i -e 's#"libcurl.so.4"#"${curl.out}/lib/libcurl.so.4"#' code/client/cl_curl.h ''; + # Default value for `USE_SDL` changed (from 0 to 1) in 5f8ce6d (2020-12-26) + # Setting `USE_SDL=0` in `makeFlags` doesn't work + preConfigure = '' + sed -i 's/USE_SDL *= 1/USE_SDL = 0/' Makefile + ''; + installPhase = '' - mkdir -p $out/bin - cp build/*/*x64 $out/bin + make install DESTDIR=$out/lib + makeWrapper $out/lib/quake3e.x64 $out/bin/quake3e + makeWrapper $out/lib/quake3e.ded.x64 $out/bin/quake3e.ded ''; meta = with lib; { |