depot/third_party/nixpkgs/pkgs/development/libraries/sfml/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

58 lines
1.4 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, libX11
, freetype
, libjpeg
, openal
, flac
, libvorbis
, glew
, libXrandr
, libXrender
, udev
, xcbutilimage
, IOKit
, Foundation
, AppKit
, OpenAL
}:
stdenv.mkDerivation rec {
pname = "sfml";
version = "2.5.1";
src = fetchFromGitHub {
owner = "SFML";
repo = "SFML";
rev = version;
sha256 = "sha256-Xt2Ct4vV459AsSvJxQfwMsNs6iA5y3epT95pLWJGeSk=";
};
nativeBuildInputs = [ cmake ];
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 ];
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 ];
platforms = platforms.unix;
};
}