about summary refs log tree commit diff
path: root/pkgs/development/libraries/SDL2/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/SDL2/default.nix')
-rw-r--r--pkgs/development/libraries/SDL2/default.nix21
1 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
index 3b423e79ed13..9e319154717b 100644
--- a/pkgs/development/libraries/SDL2/default.nix
+++ b/pkgs/development/libraries/SDL2/default.nix
@@ -8,7 +8,7 @@
   libGLSupported ? lib.elem stdenv.hostPlatform.system mesa.meta.platforms,
   openglSupport ? libGLSupported,
   libGL,
-  alsaSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid,
+  alsaSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
   alsa-lib,
   x11Support ? !stdenv.hostPlatform.isWindows && !stdenv.hostPlatform.isAndroid,
   libX11,
@@ -21,7 +21,7 @@
   libXext,
   libXxf86vm,
   libXrandr,
-  waylandSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid,
+  waylandSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
   wayland,
   wayland-protocols,
   wayland-scanner,
@@ -29,17 +29,18 @@
   libdrm,
   mesa,
   libxkbcommon,
-  dbusSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid,
+  dbusSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
   dbus,
-  udevSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid,
+  udevSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
   udev,
   ibusSupport ? false,
   ibus,
-  libdecorSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid,
+  libdecorSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
   libdecor,
-  pipewireSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid,
+  pipewireSupport ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
   pipewire, # NOTE: must be built with SDL2 without pipewire support
-  pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid,
+  pulseaudioSupport ?
+    config.pulseaudio or stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAndroid,
   libpulseaudio,
   AudioUnit,
   Cocoa,
@@ -112,7 +113,7 @@ stdenv.mkDerivation (finalAttrs: {
   dlopenPropagatedBuildInputs =
     [ ]
     # Propagated for #include <GLES/gl.h> in SDL_opengles.h.
-    ++ lib.optional (openglSupport && !stdenv.isDarwin) libGL
+    ++ lib.optional (openglSupport && !stdenv.hostPlatform.isDarwin) libGL
     # Propagated for #include <X11/Xlib.h> and <X11/Xatom.h> in SDL_syswm.h.
     ++ lib.optionals x11Support [ libX11 ];
 
@@ -153,7 +154,7 @@ stdenv.mkDerivation (finalAttrs: {
     ++ finalAttrs.dlopenBuildInputs
     ++ lib.optional ibusSupport ibus
     ++ lib.optionals waylandSupport [ wayland-protocols ]
-    ++ lib.optionals stdenv.isDarwin [
+    ++ lib.optionals stdenv.hostPlatform.isDarwin [
       AudioUnit
       Cocoa
       CoreAudio
@@ -169,7 +170,7 @@ stdenv.mkDerivation (finalAttrs: {
     ++ lib.optional (!x11Support) "--without-x"
     ++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib"
     ++ lib.optional stdenv.hostPlatform.isWindows "--disable-video-opengles"
-    ++ lib.optional stdenv.isDarwin "--disable-sdltest";
+    ++ lib.optional stdenv.hostPlatform.isDarwin "--disable-sdltest";
 
   # We remove libtool .la files when static libs are requested,
   # because they make the builds of downstream libs like `SDL_tff`