Merge pull request #52705 from jacereda/darwin-sfml-fix

Fix sfml build on Darwin
This commit is contained in:
Daiderd Jordan 2019-01-03 19:47:20 +01:00 committed by GitHub
commit d0f4baf45c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ stdenv, fetchzip, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis { stdenv, fetchzip, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis
, glew, libXrandr, libXrender, udev, xcbutilimage , glew, libXrandr, libXrender, udev, xcbutilimage
, IOKit, Foundation, AppKit, OpenAL , cf-private, IOKit, Foundation, AppKit, OpenAL
}: }:
let let
@ -16,10 +16,13 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = [ libX11 freetype libjpeg openal flac libvorbis glew buildInputs = [ freetype libjpeg openal flac libvorbis glew ]
libXrandr libXrender xcbutilimage ++ stdenv.lib.optional stdenv.isLinux udev
] ++ stdenv.lib.optional stdenv.isLinux udev ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXrandr libXrender xcbutilimage ]
++ stdenv.lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL ]; ++ stdenv.lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL
# Needed for _NSDefaultRunLoopMode, _OBJC_CLASS_$_NSArray, _OBJC_CLASS_$_NSDate
cf-private
];
cmakeFlags = [ "-DSFML_INSTALL_PKGCONFIG_FILES=yes" cmakeFlags = [ "-DSFML_INSTALL_PKGCONFIG_FILES=yes"
"-DSFML_MISC_INSTALL_PREFIX=share/SFML" "-DSFML_MISC_INSTALL_PREFIX=share/SFML"

View File

@ -12496,6 +12496,7 @@ in
sfml = callPackage ../development/libraries/sfml { sfml = callPackage ../development/libraries/sfml {
inherit (darwin.apple_sdk.frameworks) IOKit Foundation AppKit OpenAL; inherit (darwin.apple_sdk.frameworks) IOKit Foundation AppKit OpenAL;
inherit (darwin) cf-private;
}; };
csfml = callPackage ../development/libraries/csfml { }; csfml = callPackage ../development/libraries/csfml { };