From 4a8caddb6e2e34d4a5fc9aebd85c5dd9ffe53be8 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Mon, 27 Nov 2017 15:30:05 +0000 Subject: [PATCH] SDL2_image: support darwin --- pkgs/development/libraries/SDL2_image/default.nix | 9 ++++++--- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/SDL2_image/default.nix b/pkgs/development/libraries/SDL2_image/default.nix index 548f8e686ba8..91b4a563da0f 100644 --- a/pkgs/development/libraries/SDL2_image/default.nix +++ b/pkgs/development/libraries/SDL2_image/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, SDL2, libpng, libjpeg, libtiff, libungif, libXpm, zlib }: +{ stdenv, fetchurl, SDL2, libpng, libjpeg, libtiff, libungif, libXpm, zlib, Foundation }: stdenv.mkDerivation rec { name = "SDL2_image-${version}"; @@ -9,12 +9,15 @@ stdenv.mkDerivation rec { sha256 = "1s3ciydixrgv34vlf45ak5syq5nlfaqf19wf162lbz4ixxd0gpvj"; }; - buildInputs = [ SDL2 libpng libjpeg libtiff libungif libXpm zlib ]; + buildInputs = [ SDL2 libpng libjpeg libtiff libungif libXpm zlib ] + ++ stdenv.lib.optional stdenv.isDarwin Foundation; + + enableParallelBuilding = true; meta = with stdenv.lib; { description = "SDL image library"; homepage = http://www.libsdl.org/projects/SDL_image/; - platforms = platforms.linux; + platforms = platforms.unix; license = licenses.zlib; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3051f6826963..7cf3ac61e2ff 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10669,7 +10669,9 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL; }; - SDL2_image = callPackage ../development/libraries/SDL2_image { }; + SDL2_image = callPackage ../development/libraries/SDL2_image { + inherit (darwin.apple_sdk.frameworks) Foundation; + }; SDL2_mixer = callPackage ../development/libraries/SDL2_mixer { };