nixpkgs/pkgs/development/libraries/sfml/default.nix

39 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchzip, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis
2016-07-25 19:30:34 +00:00
, glew, libXrandr, libXrender, udev, xcbutilimage
2019-06-19 18:33:40 +00:00
, IOKit, Foundation, AppKit, OpenAL
}:
2016-07-25 19:30:34 +00:00
2021-07-17 18:37:27 +00:00
stdenv.mkDerivation rec {
2019-08-13 21:52:01 +00:00
pname = "sfml";
2021-07-17 18:37:27 +00:00
version = "2.5.1";
src = fetchzip {
2017-10-01 05:16:16 +00:00
url = "https://github.com/SFML/SFML/archive/${version}.tar.gz";
sha256 = "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay";
};
nativeBuildInputs = [ cmake ];
2018-12-22 22:51:50 +00:00
buildInputs = [ freetype libjpeg openal flac libvorbis glew ]
++ lib.optional stdenv.isLinux udev
++ lib.optionals (!stdenv.isDarwin) [ libX11 libXrandr libXrender xcbutilimage ]
++ lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL ];
2018-05-20 19:45:50 +00:00
cmakeFlags = [ "-DSFML_INSTALL_PKGCONFIG_FILES=yes"
"-DSFML_MISC_INSTALL_PREFIX=share/SFML"
"-DSFML_BUILD_FRAMEWORKS=no"
"-DSFML_USE_SYSTEM_DEPS=yes" ];
meta = with lib; {
homepage = "https://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 19:45:50 +00:00
platforms = platforms.unix;
};
}