2021-11-01 15:04:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-11-04 03:27:14 +00:00
|
|
|
, fetchpatch
|
2021-11-01 15:04:12 +00:00
|
|
|
, cmake
|
|
|
|
, libX11
|
|
|
|
, freetype
|
|
|
|
, libjpeg
|
|
|
|
, openal
|
|
|
|
, flac
|
|
|
|
, libvorbis
|
|
|
|
, glew
|
|
|
|
, libXrandr
|
|
|
|
, libXrender
|
|
|
|
, udev
|
|
|
|
, xcbutilimage
|
|
|
|
, IOKit
|
|
|
|
, Foundation
|
|
|
|
, AppKit
|
|
|
|
, OpenAL
|
2011-03-20 18:21:37 +00:00
|
|
|
}:
|
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";
|
2018-10-27 12:11:57 +00:00
|
|
|
|
2021-11-01 15:04:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SFML";
|
|
|
|
repo = "SFML";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-Xt2Ct4vV459AsSvJxQfwMsNs6iA5y3epT95pLWJGeSk=";
|
2011-03-20 18:21:37 +00:00
|
|
|
};
|
2018-10-27 12:11:57 +00:00
|
|
|
|
2022-11-04 03:27:14 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/macports/macports-ports/raw/4df1fc235a708ff28200ffc0a39120974ed4b6e1/multimedia/sfml/files/patch-apple-silicon.diff";
|
|
|
|
extraPrefix = "";
|
|
|
|
sha256 = "sha256-9dNawJaYtkugR+2NvhQOhgsf6w9ZXHkBgsDRh8yAJc0=";
|
|
|
|
})
|
2023-11-03 18:30:47 +00:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/SFML/SFML/commit/bf92efe9a4035fee0258386173d53556aa196e49.patch";
|
|
|
|
hash = "sha256-1htwPfpn7Z6s/3b+/i1tQ+btjr/tWv5m6IyDVMBNqQA=";
|
|
|
|
})
|
2022-11-04 03:27:14 +00:00
|
|
|
];
|
|
|
|
|
2018-10-27 12:11:57 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2018-12-22 22:51:50 +00:00
|
|
|
buildInputs = [ freetype libjpeg openal flac libvorbis glew ]
|
2021-01-21 17:00:13 +00:00
|
|
|
++ lib.optional stdenv.hostPlatform.isLinux udev
|
|
|
|
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libX11 libXrandr libXrender xcbutilimage ]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit Foundation AppKit OpenAL ];
|
2018-10-27 12:11:57 +00:00
|
|
|
|
2021-11-01 15:04:12 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DSFML_INSTALL_PKGCONFIG_FILES=yes"
|
|
|
|
"-DSFML_MISC_INSTALL_PREFIX=share/SFML"
|
|
|
|
"-DSFML_BUILD_FRAMEWORKS=no"
|
|
|
|
"-DSFML_USE_SYSTEM_DEPS=yes"
|
|
|
|
];
|
2018-10-27 12:11:57 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.sfml-dev.org/";
|
2013-10-06 09:49:53 +00:00
|
|
|
description = "Simple and fast multimedia library";
|
|
|
|
longDescription = ''
|
2015-04-19 20:46:51 +00:00
|
|
|
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.
|
2013-10-06 09:49:53 +00:00
|
|
|
'';
|
2011-03-20 18:21:37 +00:00
|
|
|
license = licenses.zlib;
|
|
|
|
maintainers = [ maintainers.astsmtl ];
|
2018-05-20 19:45:50 +00:00
|
|
|
platforms = platforms.unix;
|
2011-03-20 18:21:37 +00:00
|
|
|
};
|
|
|
|
}
|