csfml: 2.6.1 -> 3.0.0, csfml_2: init (#483183)

This commit is contained in:
Gaétan Lepage
2026-01-24 00:38:50 +00:00
committed by GitHub
2 changed files with 52 additions and 5 deletions
+5 -5
View File
@@ -3,18 +3,18 @@
stdenv,
fetchFromGitHub,
cmake,
sfml_2,
sfml,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "csfml";
version = "2.6.1";
version = "3.0.0";
src = fetchFromGitHub {
owner = "SFML";
repo = "CSFML";
tag = finalAttrs.version;
hash = "sha256-ECt0ySDpYWF0zuDBSnQzDwUm4Xj4z1+XSC55D6yivac=";
hash = "sha256-8CRS+dV/hVQNTmgkxyFKcyTj/HWRks5bie4n6N/RWYM=";
};
# Fix incorrect path joining in cmake
@@ -27,9 +27,9 @@ stdenv.mkDerivation (finalAttrs: {
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ sfml_2 ];
buildInputs = [ sfml ];
cmakeFlags = [
(lib.cmakeFeature "CMAKE_MODULE_PATH" "${sfml_2}/share/SFML/cmake/Modules/")
(lib.cmakeFeature "CMAKE_MODULE_PATH" "${sfml}/share/SFML/cmake/Modules/")
];
meta = {
+47
View File
@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
sfml_2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "csfml";
version = "2.6.1";
src = fetchFromGitHub {
owner = "SFML";
repo = "CSFML";
tag = finalAttrs.version;
hash = "sha256-ECt0ySDpYWF0zuDBSnQzDwUm4Xj4z1+XSC55D6yivac=";
};
# Fix incorrect path joining in cmake
# https://github.com/NixOS/nixpkgs/issues/144170
postPatch = ''
substituteInPlace tools/pkg-config/csfml-*.pc.in \
--replace-fail \
'libdir=''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@' \
"libdir=@CMAKE_INSTALL_FULL_LIBDIR@"
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ sfml_2 ];
cmakeFlags = [
(lib.cmakeFeature "CMAKE_MODULE_PATH" "${sfml_2}/share/SFML/cmake/Modules/")
];
meta = {
homepage = "https://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 = lib.licenses.zlib;
maintainers = [ lib.maintainers.jpdoyle ];
platforms = lib.platforms.linux;
};
})