summary refs log tree commit diff
diff options
context:
space:
mode:
authorgnidorah <gnidorah@users.noreply.github.com>2020-11-29 12:47:58 +0300
committergnidorah <gnidorah@users.noreply.github.com>2020-11-29 12:47:58 +0300
commitf7029d628b0cdc521cdb1ae0f1fe1bc35e8abb77 (patch)
tree1ac4bcbc205031503a851d56e595513d8a457c9c
parent6f0c00907bbd81b47052eef59f7b284926a77289 (diff)
downloadnixpkgs-f7029d628b0cdc521cdb1ae0f1fe1bc35e8abb77.tar
nixpkgs-f7029d628b0cdc521cdb1ae0f1fe1bc35e8abb77.tar.gz
nixpkgs-f7029d628b0cdc521cdb1ae0f1fe1bc35e8abb77.tar.bz2
nixpkgs-f7029d628b0cdc521cdb1ae0f1fe1bc35e8abb77.tar.lz
nixpkgs-f7029d628b0cdc521cdb1ae0f1fe1bc35e8abb77.tar.xz
nixpkgs-f7029d628b0cdc521cdb1ae0f1fe1bc35e8abb77.tar.zst
nixpkgs-f7029d628b0cdc521cdb1ae0f1fe1bc35e8abb77.zip
openxray: replace fix with proper patch
for glibc 2.32 compatibility
-rw-r--r--pkgs/games/openxray/default.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/games/openxray/default.nix b/pkgs/games/openxray/default.nix
index 13bc046e864..304a810c3db 100644
--- a/pkgs/games/openxray/default.nix
+++ b/pkgs/games/openxray/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchFromGitHub, cmake, glew, freeimage,  liblockfile
 , openal, libtheora, SDL2, lzo, libjpeg, libogg, tbb
-, pcre, makeWrapper }:
+, pcre, makeWrapper, fetchpatch }:
 
 let
   version = "784-october-preview";
@@ -41,6 +41,13 @@ in stdenv.mkDerivation rec {
   hardeningDisable = [ "format" ];
   cmakeFlags = [ "-DCMAKE_INCLUDE_PATH=${cryptopp}/include/cryptopp" ];
 
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/OpenXRay/xray-16/commit/4532cba11e98808c92e56e246188863261ef9201.patch";
+      sha256 = "1hrm4rkkg946ai95krzpf3isryzbb2vips63gxf481plv4vlcfc9";
+    })
+  ];
+
   buildInputs = [
     glew freeimage liblockfile openal cryptopp libtheora SDL2 lzo
     libjpeg libogg tbb pcre
@@ -50,10 +57,6 @@ in stdenv.mkDerivation rec {
   preConfigure = ''
     substituteInPlace src/xrCore/xrCore.cpp \
       --replace /usr/share $out/share
-
-    # https://github.com/OpenXRay/xray-16/issues/667
-    echo "inline const char* xr_sys_errlist[100] = {};" >> src/Common/PlatformLinux.inl
-    echo "#define _sys_errlist xr_sys_errlist" >> src/Common/PlatformLinux.inl
   '';
 
   postInstall = ''