2018-10-27 13:11:57 +01:00
|
|
|
{ stdenv, fetchzip, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis
|
2016-07-25 20:30:34 +01:00
|
|
|
, glew, libXrandr, libXrender, udev, xcbutilimage
|
2019-01-03 15:13:12 +00:00
|
|
|
, cf-private, IOKit, Foundation, AppKit, OpenAL
|
2011-03-20 18:21:37 +00:00
|
|
|
}:
|
2016-07-25 20:30:34 +01:00
|
|
|
|
|
|
|
let
|
2018-10-27 13:11:57 +01:00
|
|
|
version = "2.5.1";
|
2016-07-25 20:30:34 +01:00
|
|
|
in
|
|
|
|
|
2011-03-20 18:21:37 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-07-25 20:30:34 +01:00
|
|
|
name = "sfml-${version}";
|
2018-10-27 13:11:57 +01:00
|
|
|
|
|
|
|
src = fetchzip {
|
2017-10-01 06:16:16 +01:00
|
|
|
url = "https://github.com/SFML/SFML/archive/${version}.tar.gz";
|
2018-10-27 13:11:57 +01:00
|
|
|
sha256 = "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay";
|
2011-03-20 18:21:37 +00:00
|
|
|
};
|
2018-10-27 13:11:57 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2018-12-22 22:51:50 +00:00
|
|
|
buildInputs = [ freetype libjpeg openal flac libvorbis glew ]
|
|
|
|
++ stdenv.lib.optional stdenv.isLinux udev
|
|
|
|
++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXrandr libXrender xcbutilimage ]
|
2019-01-03 15:13:12 +00:00
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL
|
|
|
|
# Needed for _NSDefaultRunLoopMode, _OBJC_CLASS_$_NSArray, _OBJC_CLASS_$_NSDate
|
|
|
|
cf-private
|
|
|
|
];
|
2018-10-27 13:11:57 +01:00
|
|
|
|
2018-05-20 20:45:50 +01:00
|
|
|
cmakeFlags = [ "-DSFML_INSTALL_PKGCONFIG_FILES=yes"
|
|
|
|
"-DSFML_MISC_INSTALL_PREFIX=share/SFML"
|
|
|
|
"-DSFML_BUILD_FRAMEWORKS=no"
|
|
|
|
"-DSFML_USE_SYSTEM_DEPS=yes" ];
|
2018-10-27 13:11:57 +01:00
|
|
|
|
2011-03-20 18:21:37 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.sfml-dev.org/;
|
2013-10-06 10:49:53 +01:00
|
|
|
description = "Simple and fast multimedia library";
|
|
|
|
longDescription = ''
|
2015-04-19 21:46:51 +01:00
|
|
|
SFML is a simple, fast, cross-platform and object-oriented multimedia API.
|
|
|
|
It provides access to windowing, graphics, audio and network.
|
|
|
|
It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python.
|
2013-10-06 10:49:53 +01:00
|
|
|
'';
|
2011-03-20 18:21:37 +00:00
|
|
|
license = licenses.zlib;
|
|
|
|
maintainers = [ maintainers.astsmtl ];
|
2018-05-20 20:45:50 +01:00
|
|
|
platforms = platforms.unix;
|
2011-03-20 18:21:37 +00:00
|
|
|
};
|
|
|
|
}
|