about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2024-03-06 22:43:02 +0100
committerGitHub <noreply@github.com>2024-03-06 22:43:02 +0100
commit2198f903e972e72ca50adf82ca8cf1f34a40b451 (patch)
tree6bff35063189dc0b89519fc780efcb44569ceb33
parentf9b5682ee0d0c7b4bcc32a2305574217faa558c4 (diff)
parente468e3b9e2979fb10bb9783964d9d720a46ff155 (diff)
downloadnixlib-2198f903e972e72ca50adf82ca8cf1f34a40b451.tar
nixlib-2198f903e972e72ca50adf82ca8cf1f34a40b451.tar.gz
nixlib-2198f903e972e72ca50adf82ca8cf1f34a40b451.tar.bz2
nixlib-2198f903e972e72ca50adf82ca8cf1f34a40b451.tar.lz
nixlib-2198f903e972e72ca50adf82ca8cf1f34a40b451.tar.xz
nixlib-2198f903e972e72ca50adf82ca8cf1f34a40b451.tar.zst
nixlib-2198f903e972e72ca50adf82ca8cf1f34a40b451.zip
Merge pull request #288890 from SuperSamus/rpcs3-flags
rpcs3: add `USE_SDL` and `USE_DISCORD_RPC` flags
-rw-r--r--pkgs/by-name/rp/rpcs3/package.nix35
1 files changed, 19 insertions, 16 deletions
diff --git a/pkgs/by-name/rp/rpcs3/package.nix b/pkgs/by-name/rp/rpcs3/package.nix
index fc139584c6e7..058d95bb4414 100644
--- a/pkgs/by-name/rp/rpcs3/package.nix
+++ b/pkgs/by-name/rp/rpcs3/package.nix
@@ -22,6 +22,7 @@
 , flatbuffers
 , llvm_16
 , cubeb
+, enableDiscordRpc ? false
 , faudioSupport ? true
 , faudio
 , SDL2
@@ -62,29 +63,31 @@ stdenv.mkDerivation {
   '';
 
   cmakeFlags = [
-    "-DUSE_SYSTEM_ZLIB=ON"
-    "-DUSE_SYSTEM_LIBUSB=ON"
-    "-DUSE_SYSTEM_LIBPNG=ON"
-    "-DUSE_SYSTEM_FFMPEG=ON"
-    "-DUSE_SYSTEM_CURL=ON"
-    "-DUSE_SYSTEM_WOLFSSL=ON"
-    "-DUSE_SYSTEM_FAUDIO=ON"
-    "-DUSE_SYSTEM_PUGIXML=ON"
-    "-DUSE_SYSTEM_FLATBUFFERS=ON"
-    "-DUSE_SYSTEM_SDL=ON"
-    "-DWITH_LLVM=ON"
-    "-DBUILD_LLVM=OFF"
-    "-DUSE_NATIVE_INSTRUCTIONS=OFF"
-    "-DUSE_FAUDIO=${if faudioSupport then "ON" else "OFF"}"
+    (lib.cmakeBool "USE_SYSTEM_ZLIB" true)
+    (lib.cmakeBool "USE_SYSTEM_LIBUSB" true)
+    (lib.cmakeBool "USE_SYSTEM_LIBPNG" true)
+    (lib.cmakeBool "USE_SYSTEM_FFMPEG" true)
+    (lib.cmakeBool "USE_SYSTEM_CURL" true)
+    (lib.cmakeBool "USE_SYSTEM_WOLFSSL" true)
+    (lib.cmakeBool "USE_SYSTEM_FAUDIO" true)
+    (lib.cmakeBool "USE_SYSTEM_PUGIXML" true)
+    (lib.cmakeBool "USE_SYSTEM_FLATBUFFERS" true)
+    (lib.cmakeBool "USE_SYSTEM_SDL" true)
+    (lib.cmakeBool "USE_SDL" true)
+    (lib.cmakeBool "WITH_LLVM" true)
+    (lib.cmakeBool "BUILD_LLVM" false)
+    (lib.cmakeBool "USE_NATIVE_INSTRUCTIONS" false)
+    (lib.cmakeBool "USE_DISCORD_RPC" enableDiscordRpc)
+    (lib.cmakeBool "USE_FAUDIO" faudioSupport)
   ];
 
   nativeBuildInputs = [ cmake pkg-config git wrapQtAppsHook ];
 
   buildInputs = [
     qtbase qtmultimedia openal glew vulkan-headers vulkan-loader libpng ffmpeg
-    libevdev zlib libusb1 curl wolfssl python3 pugixml flatbuffers llvm_16 libSM
+    libevdev zlib libusb1 curl wolfssl python3 pugixml SDL2 flatbuffers llvm_16 libSM
   ] ++ cubeb.passthru.backendLibs
-    ++ lib.optionals faudioSupport [ faudio SDL2 ]
+    ++ lib.optional faudioSupport faudio
     ++ lib.optionals waylandSupport [ wayland qtwayland ];
 
   postInstall = ''