Files
nixpkgs/pkgs/by-name/sf/sfml_2/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

76 lines
1.7 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
# nativeBuildInputs
cmake,
# buildInputs
flac,
freetype,
glew,
libjpeg,
libvorbis,
openal,
udev,
libX11,
libXcursor,
libXrandr,
libXrender,
xcbutilimage,
}:
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
xcbutilimage
];
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;
badPlatforms = [
# error: implicit instantiation of undefined template 'std::char_traits<unsigned int>'
lib.systems.inspect.patterns.isDarwin
];
};
})