2021-01-21 18:00:13 +01:00
|
|
|
{ lib, stdenv, fetchzip, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis
|
2016-07-25 21:30:34 +02:00
|
|
|
, glew, libXrandr, libXrender, udev, xcbutilimage
|
2019-06-19 20:33:40 +02:00
|
|
|
, IOKit, Foundation, AppKit, OpenAL
|
2011-03-20 19:21:37 +01:00
|
|
|
}:
|
2016-07-25 21:30:34 +02:00
|
|
|
|
|
|
|
let
|
2018-10-27 14:11:57 +02:00
|
|
|
version = "2.5.1";
|
2016-07-25 21:30:34 +02:00
|
|
|
in
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "sfml";
|
|
|
|
inherit version;
|
2018-10-27 14:11:57 +02:00
|
|
|
|
|
|
|
src = fetchzip {
|
2017-10-01 07:16:16 +02:00
|
|
|
url = "https://github.com/SFML/SFML/archive/${version}.tar.gz";
|
2018-10-27 14:11:57 +02:00
|
|
|
sha256 = "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay";
|
2011-03-20 19:21:37 +01:00
|
|
|
};
|
2018-10-27 14:11:57 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2018-12-22 23:51:50 +01:00
|
|
|
buildInputs = [ freetype libjpeg openal flac libvorbis glew ]
|
2021-01-21 18:00:13 +01:00
|
|
|
++ lib.optional stdenv.isLinux udev
|
|
|
|
++ lib.optionals (!stdenv.isDarwin) [ libX11 libXrandr libXrender xcbutilimage ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL ];
|
2018-10-27 14:11:57 +02:00
|
|
|
|
2018-05-20 21:45:50 +02: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 14:11:57 +02:00
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.sfml-dev.org/";
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Simple and fast multimedia library";
|
|
|
|
longDescription = ''
|
2015-04-19 22:46:51 +02: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 11:49:53 +02:00
|
|
|
'';
|
2011-03-20 19:21:37 +01:00
|
|
|
license = licenses.zlib;
|
|
|
|
maintainers = [ maintainers.astsmtl ];
|
2018-05-20 21:45:50 +02:00
|
|
|
platforms = platforms.unix;
|
2011-03-20 19:21:37 +01:00
|
|
|
};
|
|
|
|
}
|