summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-10 12:31:03 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-10 13:14:12 -0400
commit219b74d71bdd8c93d099cc921cc4f192bd8753ad (patch)
treeb2566ed4e7f93429532dcea6d5e194b2cdc33022 /pkgs/development
parent515ca1a7c8ca1c57b472826ae2b5dd2965b8b4bf (diff)
downloadnixpkgs-219b74d71bdd8c93d099cc921cc4f192bd8753ad.tar
nixpkgs-219b74d71bdd8c93d099cc921cc4f192bd8753ad.tar.gz
nixpkgs-219b74d71bdd8c93d099cc921cc4f192bd8753ad.tar.bz2
nixpkgs-219b74d71bdd8c93d099cc921cc4f192bd8753ad.tar.lz
nixpkgs-219b74d71bdd8c93d099cc921cc4f192bd8753ad.tar.xz
nixpkgs-219b74d71bdd8c93d099cc921cc4f192bd8753ad.tar.zst
nixpkgs-219b74d71bdd8c93d099cc921cc4f192bd8753ad.zip
SDL, SDL2: Remove crossAttrs
Cross drvs are now the default for precisely this reason.
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/SDL/default.nix36
-rw-r--r--pkgs/development/libraries/SDL2/default.nix18
2 files changed, 17 insertions, 37 deletions
diff --git a/pkgs/development/libraries/SDL/default.nix b/pkgs/development/libraries/SDL/default.nix
index 5e1c527eb8b..7e96cf84686 100644
--- a/pkgs/development/libraries/SDL/default.nix
+++ b/pkgs/development/libraries/SDL/default.nix
@@ -15,24 +15,6 @@ with lib;
 assert !stdenv.isDarwin -> alsaSupport || pulseaudioSupport;
 assert openglSupport -> (stdenv.isDarwin || x11Support && libGL != null && libGLU != null);
 
-let
-
-  configureFlagsFun = attrs: [
-    "--disable-oss"
-    "--disable-video-x11-xme"
-    "--enable-rpath"
-  # Building without this fails on Darwin with
-  #
-  #   ./src/video/x11/SDL_x11sym.h:168:17: error: conflicting types for '_XData32'
-  #   SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
-  #
-  # Please try revert the change that introduced this comment when updating SDL.
-  ] ++ optional stdenv.isDarwin "--disable-x11-shared"
-    ++ optional (!x11Support) "--without-x"
-    ++ optional alsaSupport "--with-alsa-prefix=${attrs.alsaLib.out}/lib";
-
-in
-
 stdenv.mkDerivation rec {
   name    = "SDL-${version}";
   version = "1.2.15";
@@ -62,11 +44,19 @@ stdenv.mkDerivation rec {
     ++ optional (!hostPlatform.isMinGW) audiofile
     ++ optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ];
 
-  configureFlags = configureFlagsFun { inherit alsaLib; };
-
-  crossAttrs = {
-    configureFlags = configureFlagsFun { alsaLib = alsaLib.crossDrv; };
-  };
+  configureFlags = [
+    "--disable-oss"
+    "--disable-video-x11-xme"
+    "--enable-rpath"
+  # Building without this fails on Darwin with
+  #
+  #   ./src/video/x11/SDL_x11sym.h:168:17: error: conflicting types for '_XData32'
+  #   SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
+  #
+  # Please try revert the change that introduced this comment when updating SDL.
+  ] ++ optional stdenv.isDarwin "--disable-x11-shared"
+    ++ optional (!x11Support) "--without-x"
+    ++ optional alsaSupport "--with-alsa-prefix=${alsaLib.out}/lib";
 
   patches = [
     ./find-headers.patch
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
index fe19ecadd0e..d852b594f6d 100644
--- a/pkgs/development/libraries/SDL2/default.nix
+++ b/pkgs/development/libraries/SDL2/default.nix
@@ -19,15 +19,6 @@ with lib;
 assert !stdenv.isDarwin -> alsaSupport || pulseaudioSupport;
 assert openglSupport -> (stdenv.isDarwin || x11Support && libGL != null);
 
-let
-
-  configureFlagsFun = attrs: [
-    "--disable-oss"
-  ] ++ optional (!x11Support) "--without-x"
-    ++ optional alsaSupport "--with-alsa-prefix=${attrs.alsaLib.out}/lib";
-
-in
-
 stdenv.mkDerivation rec {
   name = "SDL2-${version}";
   version = "2.0.8";
@@ -61,11 +52,10 @@ stdenv.mkDerivation rec {
   #   pointer-constraints-unstable-v1-client-protocol.h: No such file or directory
   enableParallelBuilding = false;
 
-  configureFlags = configureFlagsFun { inherit alsaLib; };
-
-  crossAttrs = {
-    configureFlags = configureFlagsFun { alsaLib = alsaLib.crossDrv; };
-  };
+  configureFlags = [
+    "--disable-oss"
+  ] ++ optional (!x11Support) "--without-x"
+    ++ optional alsaSupport "--with-alsa-prefix=${alsaLib.out}/lib";
 
   postInstall = ''
     moveToOutput lib/libSDL2main.a "$dev"