summary refs log tree commit diff
path: root/pkgs/games/openxray
diff options
context:
space:
mode:
authorgnidorah <gnidorah@users.noreply.github.com>2019-11-19 17:32:11 +0300
committerLassulus <github@lassul.us>2019-11-24 16:10:28 +0100
commitc67d3f1a878f75619d69e9c2262813deda97508c (patch)
treefac3cf1f300030ead40849f85ba3f7b45cf527d7 /pkgs/games/openxray
parentb9d458d91c1d39b8b5954c84afc862b044cf84d5 (diff)
downloadnixpkgs-c67d3f1a878f75619d69e9c2262813deda97508c.tar
nixpkgs-c67d3f1a878f75619d69e9c2262813deda97508c.tar.gz
nixpkgs-c67d3f1a878f75619d69e9c2262813deda97508c.tar.bz2
nixpkgs-c67d3f1a878f75619d69e9c2262813deda97508c.tar.lz
nixpkgs-c67d3f1a878f75619d69e9c2262813deda97508c.tar.xz
nixpkgs-c67d3f1a878f75619d69e9c2262813deda97508c.tar.zst
nixpkgs-c67d3f1a878f75619d69e9c2262813deda97508c.zip
openxray: make it work again after #72199
Diffstat (limited to 'pkgs/games/openxray')
-rw-r--r--pkgs/games/openxray/default.nix32
1 files changed, 28 insertions, 4 deletions
diff --git a/pkgs/games/openxray/default.nix b/pkgs/games/openxray/default.nix
index 9960d94a247..c115833d848 100644
--- a/pkgs/games/openxray/default.nix
+++ b/pkgs/games/openxray/default.nix
@@ -1,9 +1,8 @@
 { stdenv, fetchFromGitHub, cmake, glew, freeimage,  liblockfile
-, openal, cryptopp, libtheora, SDL2, lzo, libjpeg, libogg, tbb
+, openal, libtheora, SDL2, lzo, libjpeg, libogg, tbb
 , pcre, makeWrapper }:
 
-stdenv.mkDerivation rec {
-  pname = "OpenXRay";
+let
   version = "558";
 
   src = fetchFromGitHub {
@@ -14,6 +13,31 @@ stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
+  # https://github.com/OpenXRay/xray-16/issues/518
+  cryptopp = stdenv.mkDerivation {
+    pname = "cryptopp";
+    version = "5.6.5";
+
+    inherit src;
+
+    postUnpack = "sourceRoot+=/Externals/cryptopp";
+
+    makeFlags = [ "PREFIX=${placeholder "out"}" ];
+    enableParallelBuilding = true;
+
+    doCheck = true;
+
+    meta = with stdenv.lib; {
+      description = "Crypto++, a free C++ class library of cryptographic schemes";
+      homepage = "https://cryptopp.com/";
+      license = with licenses; [ boost publicDomain ];
+      platforms = platforms.all;
+    };
+  };
+in stdenv.mkDerivation rec {
+  pname = "OpenXRay";
+  inherit version src;
+
   hardeningDisable = [ "format" ];
   cmakeFlags = [ "-DCMAKE_INCLUDE_PATH=${cryptopp}/include/cryptopp" ];
   installFlags = [ "DESTDIR=${placeholder "out"}" ];
@@ -47,6 +71,6 @@ stdenv.mkDerivation rec {
       url = https://github.com/OpenXRay/xray-16/blob/xd_dev/License.txt;
     };
     maintainers = [ maintainers.gnidorah ];
-    platforms = ["x86_64-linux" "i686-linux" ];
+    platforms = [ "x86_64-linux" "i686-linux" ];
   };
 }