about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/rp/rpcs3/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/by-name/rp/rpcs3/package.nix')
-rw-r--r--nixpkgs/pkgs/by-name/rp/rpcs3/package.nix35
1 files changed, 19 insertions, 16 deletions
diff --git a/nixpkgs/pkgs/by-name/rp/rpcs3/package.nix b/nixpkgs/pkgs/by-name/rp/rpcs3/package.nix
index fc139584c6e7..058d95bb4414 100644
--- a/nixpkgs/pkgs/by-name/rp/rpcs3/package.nix
+++ b/nixpkgs/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 = ''