3
0
Fork 0
forked from mirrors/nixpkgs

sfml: support darwin

This commit is contained in:
Matthew Bauer 2018-05-20 14:45:50 -05:00
parent b72a8a41c3
commit 3dc8328b1f
2 changed files with 12 additions and 5 deletions

View file

@ -1,5 +1,6 @@
{ stdenv, fetchurl, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis
, glew, libXrandr, libXrender, udev, xcbutilimage
, IOKit, Foundation, AppKit, OpenAL
}:
let
@ -13,9 +14,13 @@ stdenv.mkDerivation rec {
sha256 = "1x3yvhdrln5b6h4g5r4mds76gq8zsxw6icxqpwqkmxsqcq5yviab";
};
buildInputs = [ cmake libX11 freetype libjpeg openal flac libvorbis glew
libXrandr libXrender udev xcbutilimage
];
cmakeFlags = [ "-DSFML_INSTALL_PKGCONFIG_FILES=yes" ];
libXrandr libXrender xcbutilimage
] ++ stdenv.lib.optional stdenv.isLinux udev
++ stdenv.lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL ];
cmakeFlags = [ "-DSFML_INSTALL_PKGCONFIG_FILES=yes"
"-DSFML_MISC_INSTALL_PREFIX=share/SFML"
"-DSFML_BUILD_FRAMEWORKS=no"
"-DSFML_USE_SYSTEM_DEPS=yes" ];
meta = with stdenv.lib; {
homepage = http://www.sfml-dev.org/;
description = "Simple and fast multimedia library";
@ -26,6 +31,6 @@ stdenv.mkDerivation rec {
'';
license = licenses.zlib;
maintainers = [ maintainers.astsmtl ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View file

@ -11564,7 +11564,9 @@ with pkgs;
simpleitk = callPackage ../development/libraries/simpleitk { lua = lua51Packages.lua; };
sfml = callPackage ../development/libraries/sfml { };
sfml = callPackage ../development/libraries/sfml {
inherit (darwin.apple_sdk.frameworks) IOKit Foundation AppKit OpenAL;
};
csfml = callPackage ../development/libraries/csfml { };
shapelib = callPackage ../development/libraries/shapelib { };