From 3b2969b1a569e1f95ad0e51b8fdb05f76efdf1cc Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 22 Jun 2024 18:51:20 -0400 Subject: [PATCH] prismlauncher: improve assertions controllerSupport and textToSpeechSupport have no effect outside of linux and have no reason to be set; both of these work out of the box on darwin without any intervention from us --- pkgs/by-name/pr/prismlauncher-unwrapped/package.nix | 2 +- pkgs/by-name/pr/prismlauncher/package.nix | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix index c51d285068bf..2e8b7efef878 100644 --- a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix +++ b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix @@ -31,7 +31,7 @@ in assert lib.assertMsg ( gamemodeSupport -> stdenv.isLinux -) "gamemodeSupport is only available on Linux!"; +) "gamemodeSupport is only available on Linux."; stdenv.mkDerivation (finalAttrs: { pname = "prismlauncher-unwrapped"; diff --git a/pkgs/by-name/pr/prismlauncher/package.nix b/pkgs/by-name/pr/prismlauncher/package.nix index c7e299b2a8e1..c6ff6894389d 100644 --- a/pkgs/by-name/pr/prismlauncher/package.nix +++ b/pkgs/by-name/pr/prismlauncher/package.nix @@ -45,9 +45,17 @@ withWaylandGLFW ? false, }: +assert lib.assertMsg ( + controllerSupport -> stdenv.isLinux +) "controllerSupport only has an effect on Linux."; + +assert lib.assertMsg ( + textToSpeechSupport -> stdenv.isLinux +) "textToSpeechSupport only has an effect on Linux."; + assert lib.assertMsg ( withWaylandGLFW -> stdenv.isLinux -) "withWaylandGLFW is only available on Linux!"; +) "withWaylandGLFW is only available on Linux."; let prismlauncher' = prismlauncher-unwrapped.override { inherit msaClientID gamemodeSupport; };