Skip to content

Instantly share code, notes, and snippets.

@jacereda
Created December 21, 2018 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacereda/ecd4f9a302b6fac1313e3befacb86d87 to your computer and use it in GitHub Desktop.
Save jacereda/ecd4f9a302b6fac1313e3befacb86d87 to your computer and use it in GitHub Desktop.
{ stdenv, fetchurl, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis
, glew, libXrandr, libXrender, udev, xcbutilimage
, IOKit, Foundation, AppKit, OpenAL
}:
let
version = "2.5.1";
in
stdenv.mkDerivation rec {
name = "sfml-${version}";
src = fetchurl {
url = "https://github.com/SFML/SFML/archive/${version}.tar.gz";
sha256 = "2x3yvhdrln5b6h4g5r4mds76gq8zsxw6icxqpwqkmxsqcq5yviab";
};
buildInputs = [ cmake libX11 freetype libjpeg openal flac libvorbis glew
libXrandr libXrender xcbutilimage
] ++ stdenv.lib.optional stdenv.isLinux udev
++ stdenv.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 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 ];
platforms = platforms.unix;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment