3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/sfml/default.nix

42 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchzip, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis
2016-07-25 20:30:34 +01:00
, glew, libXrandr, libXrender, udev, xcbutilimage
2018-05-20 20:45:50 +01:00
, IOKit, Foundation, AppKit, OpenAL
}:
2016-07-25 20:30:34 +01:00
let
version = "2.5.1";
2016-07-25 20:30:34 +01:00
in
stdenv.mkDerivation rec {
2016-07-25 20:30:34 +01:00
name = "sfml-${version}";
src = fetchzip {
2017-10-01 06:16:16 +01:00
url = "https://github.com/SFML/SFML/archive/${version}.tar.gz";
sha256 = "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ libX11 freetype libjpeg openal flac libvorbis glew
2018-05-20 20:45:50 +01:00
libXrandr libXrender xcbutilimage
] ++ stdenv.lib.optional stdenv.isLinux udev
++ stdenv.lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL ];
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" ];
meta = with stdenv.lib; {
homepage = http://www.sfml-dev.org/;
description = "Simple and fast multimedia library";
longDescription = ''
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.
'';
license = licenses.zlib;
maintainers = [ maintainers.astsmtl ];
2018-05-20 20:45:50 +01:00
platforms = platforms.unix;
};
}