mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
72 lines
1.5 KiB
Nix
72 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
|
|
# nativeBuildInputs
|
|
cmake,
|
|
|
|
# buildInputs
|
|
flac,
|
|
freetype,
|
|
glew,
|
|
libjpeg,
|
|
libvorbis,
|
|
openal,
|
|
udev,
|
|
libx11,
|
|
libxcursor,
|
|
libxrandr,
|
|
libxrender,
|
|
libxcb-image,
|
|
}:
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "sfml";
|
|
version = "2.6.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "SFML";
|
|
repo = "SFML";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-m8FVXM56qjuRKRmkcEcRI8v6IpaJxskoUQ+sNsR1EhM=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [
|
|
flac
|
|
freetype
|
|
glew
|
|
libjpeg
|
|
libvorbis
|
|
openal
|
|
]
|
|
++ lib.optional stdenv.hostPlatform.isLinux udev
|
|
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
|
libx11
|
|
libxcursor
|
|
libxrandr
|
|
libxrender
|
|
libxcb-image
|
|
];
|
|
|
|
cmakeFlags = [
|
|
(lib.cmakeBool "SFML_INSTALL_PKGCONFIG_FILES" true)
|
|
(lib.cmakeFeature "SFML_MISC_INSTALL_PREFIX" "share/SFML")
|
|
(lib.cmakeBool "SFML_BUILD_FRAMEWORKS" false)
|
|
(lib.cmakeBool "SFML_USE_SYSTEM_DEPS" true)
|
|
];
|
|
|
|
meta = {
|
|
description = "Simple and fast multimedia library";
|
|
homepage = "https://www.sfml-dev.org/";
|
|
changelog = "https://github.com/SFML/SFML/blob/${finalAttrs.version}/changelog.md";
|
|
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 = lib.licenses.zlib;
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|