about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKira Bruneau <kira.bruneau@pm.me>2024-04-30 20:30:25 -0400
committerKira Bruneau <kira.bruneau@pm.me>2024-05-01 17:55:19 -0400
commitc4cbe99d0c8b11366ade274f86d817fd85e4ce55 (patch)
tree1bb0f4c31caa41e3c8eb71abba3aae66f780a98e
parentcf8cc1201be8bc71b7cbbbdaf349b22f4f99c7ae (diff)
rmg: add option to build with experimental wayland support
-rw-r--r--pkgs/by-name/rm/rmg/package.nix7
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/by-name/rm/rmg/package.nix b/pkgs/by-name/rm/rmg/package.nix
index 50436f36b9289..4c2643346a44a 100644
--- a/pkgs/by-name/rm/rmg/package.nix
+++ b/pkgs/by-name/rm/rmg/package.nix
@@ -20,12 +20,13 @@
 , which
 , xdg-user-dirs
 , zlib
+, withWayland ? false
 # Affects final license
 , withAngrylionRdpPlus ? false
 }:
 
 let
-  inherit (qt6Packages) qtbase qtsvg wrapQtAppsHook;
+  inherit (qt6Packages) qtbase qtsvg qtwayland wrapQtAppsHook;
 in
 stdenv.mkDerivation rec {
   pname = "rmg";
@@ -72,7 +73,7 @@ stdenv.mkDerivation rec {
     vulkan-loader
     xdg-user-dirs
     zlib
-  ];
+  ] ++ lib.optional withWayland qtwayland;
 
   cmakeFlags = [
     "-DPORTABLE_INSTALL=OFF"
@@ -84,7 +85,7 @@ stdenv.mkDerivation rec {
 
   qtWrapperArgs = lib.optionals stdenv.isLinux [
     "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]}"
-  ];
+  ] ++ lib.optional withWayland "--set RMG_WAYLAND 1";
 
   meta = with lib; {
     homepage = "https://github.com/Rosalie241/RMG";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 7c05a8a4b35f7..90b2cfee3f3cb 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2781,6 +2781,10 @@ with pkgs;
 
   ripes = qt6Packages.callPackage ../applications/emulators/ripes { };
 
+  rmg-wayland = callPackage ../by-name/rm/rmg/package.nix {
+    withWayland = true;
+  };
+
   rpcemu = callPackage ../applications/emulators/rpcemu { };
 
   ruffle = callPackage ../applications/emulators/ruffle { };