mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-17 03:39:27 +00:00
SDL: Don't use stdenv ? cross
Simplify and finess logic a bit in a way that doesn't affect the default native build, too.
This commit is contained in:
parent
49347667a8
commit
784ffeaabd
@ -1,15 +1,15 @@
|
||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, audiofile, libcap
|
||||
, openglSupport ? false, mesa_noglu, mesa_glu
|
||||
, alsaSupport ? true, alsaLib
|
||||
, x11Support ? true, libXext, libICE, libXrandr
|
||||
, x11Support ? hostPlatform == buildPlatform, libXext, libICE, libXrandr
|
||||
, pulseaudioSupport ? true, libpulseaudio
|
||||
, OpenGL, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa
|
||||
, hostPlatform
|
||||
, hostPlatform, buildPlatform
|
||||
}:
|
||||
|
||||
# OSS is no longer supported, for it's much crappier than ALSA and
|
||||
# PulseAudio.
|
||||
assert (stdenv.isLinux && !(stdenv ? cross)) -> alsaSupport || pulseaudioSupport;
|
||||
assert hostPlatform.isLinux -> alsaSupport || pulseaudioSupport;
|
||||
|
||||
let
|
||||
inherit (stdenv.lib) optional optionals;
|
||||
@ -53,9 +53,8 @@ stdenv.mkDerivation rec {
|
||||
"--enable-rpath"
|
||||
"--disable-pulseaudio-shared"
|
||||
"--disable-osmesa-shared"
|
||||
] ++ optionals (stdenv ? cross) ([
|
||||
"--without-x"
|
||||
] ++ optional alsaSupport "--with-alsa-prefix=${alsaLib.out}/lib");
|
||||
] ++ optional (!x11Support) "--without-x"
|
||||
++ optional (alsaSupport && hostPlatform != buildPlatform) "--with-alsa-prefix=${alsaLib.out}/lib";
|
||||
|
||||
patches = [
|
||||
# Fix window resizing issues, e.g. for xmonad
|
||||
|
Loading…
Reference in New Issue
Block a user