23 stdenv.mkDerivation rec {
27 src = fetchFromGitHub {
31 sha256 = "sha256-Xt2Ct4vV459AsSvJxQfwMsNs6iA5y3epT95pLWJGeSk=";
36 url = "https://github.com/macports/macports-ports/raw/4df1fc235a708ff28200ffc0a39120974ed4b6e1/multimedia/sfml/files/patch-apple-silicon.diff";
38 sha256 = "sha256-9dNawJaYtkugR+2NvhQOhgsf6w9ZXHkBgsDRh8yAJc0=";
41 url = "https://github.com/SFML/SFML/commit/bf92efe9a4035fee0258386173d53556aa196e49.patch";
42 hash = "sha256-1htwPfpn7Z6s/3b+/i1tQ+btjr/tWv5m6IyDVMBNqQA=";
46 nativeBuildInputs = [ cmake ];
47 buildInputs = [ freetype libjpeg openal flac libvorbis glew ]
48 ++ lib.optional stdenv.isLinux udev
49 ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXrandr libXrender xcbutilimage ]
50 ++ lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL ];
53 "-DSFML_INSTALL_PKGCONFIG_FILES=yes"
54 "-DSFML_MISC_INSTALL_PREFIX=share/SFML"
55 "-DSFML_BUILD_FRAMEWORKS=no"
56 "-DSFML_USE_SYSTEM_DEPS=yes"
60 homepage = "https://www.sfml-dev.org/";
61 description = "Simple and fast multimedia library";
63 SFML is a simple, fast, cross-platform and object-oriented multimedia API.
64 It provides access to windowing, graphics, audio and network.
65 It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python.
67 license = licenses.zlib;
68 maintainers = [ maintainers.astsmtl ];
69 platforms = platforms.unix;