about summary refs log tree commit diff
path: root/pkgs/games/openxray
diff options
context:
space:
mode:
authorOPNA2608 <christoph.neidahl@gmail.com>2022-07-30 01:31:37 +0200
committerOPNA2608 <christoph.neidahl@gmail.com>2022-07-30 01:31:37 +0200
commit68354795449a00a3f25a32b82edea84f003f3b2f (patch)
treece0971d539f616c2160b0a0553d278cfa010a8d1 /pkgs/games/openxray
parent4cd955979ca1d418a60a2f1fe5a7c645d11fcc61 (diff)
openxray: Remove multiplayer option, fix license URL
Multiplayer code was never ported to Linux and crashes even with the vendored cryptopp.
Upstream suggested that we should just remove it.
Diffstat (limited to 'pkgs/games/openxray')
-rw-r--r--pkgs/games/openxray/default.nix47
1 files changed, 3 insertions, 44 deletions
diff --git a/pkgs/games/openxray/default.nix b/pkgs/games/openxray/default.nix
index 2340f14edc615..aef6c0c2e92af 100644
--- a/pkgs/games/openxray/default.nix
+++ b/pkgs/games/openxray/default.nix
@@ -13,10 +13,10 @@
 , libogg
 , pcre
 , makeWrapper
-, enableMultiplayer ? false # Requires old, insecure Crypto++ version
 }:
 
-let
+stdenv.mkDerivation rec {
+  pname = "openxray";
   version = "1144-december-2021-rc1";
 
   src = fetchFromGitHub {
@@ -27,39 +27,6 @@ let
     sha256 = "07qj1lpp21g4p583gvz5h66y2q71ymbsz4g5nr6dcys0vm7ph88v";
   };
 
-  # https://github.com/OpenXRay/xray-16/issues/518
-  ancientCryptopp = stdenv.mkDerivation {
-    pname = "cryptopp";
-    version = "5.6.5";
-
-    inherit src;
-
-    sourceRoot = "source/Externals/cryptopp";
-
-    installFlags = [ "PREFIX=${placeholder "out"}" ];
-
-    enableParallelBuilding = true;
-
-    doCheck = true;
-
-    dontStrip = true;
-
-    meta = with lib; {
-      description = "Crypto++, a free C++ class library of cryptographic schemes";
-      homepage = "https://cryptopp.com/";
-      license = with licenses; [ boost publicDomain ];
-      platforms = platforms.all;
-      knownVulnerabilities = [
-        "CVE-2019-14318"
-      ];
-    };
-  };
-in
-stdenv.mkDerivation rec {
-  pname = "openxray";
-
-  inherit version src;
-
   nativeBuildInputs = [
     cmake
     makeWrapper
@@ -76,20 +43,12 @@ stdenv.mkDerivation rec {
     libjpeg
     libogg
     pcre
-  ] ++ lib.optionals enableMultiplayer [
-    ancientCryptopp
   ];
 
   # Crashes can happen, we'd like them to be reasonably debuggable
   cmakeBuildType = "RelWithDebInfo";
   dontStrip = true;
 
-  cmakeFlags = [
-    "-DUSE_CRYPTOPP=${if enableMultiplayer then "ON" else "OFF"}"
-  ] ++ lib.optionals enableMultiplayer [
-    "-DCMAKE_INCLUDE_PATH=${ancientCryptopp}/include/cryptopp"
-  ];
-
   postInstall = ''
     # needed because of SDL_LoadObject library loading code
     wrapProgram $out/bin/xr_3da \
@@ -101,7 +60,7 @@ stdenv.mkDerivation rec {
     description = "Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World";
     homepage = "https://github.com/OpenXRay/xray-16/";
     license = licenses.unfree // {
-      url = "https://github.com/OpenXRay/xray-16/blob/xd_dev/License.txt";
+      url = "https://github.com/OpenXRay/xray-16/blob/${version}/License.txt";
     };
     maintainers = with maintainers; [ OPNA2608 ];
     platforms = [ "x86_64-linux" "i686-linux" ];