Unverified Commit 1bb70ae6 authored by Yohann Boniface's avatar Yohann Boniface Committed by GitHub
Browse files

fna3d: fix CMake 4.0 incompatibility by upgrading to 25.10 (#452952)

parents fca28085 42ee273a
Loading
Loading
Loading
Loading
+10 −13
Original line number Diff line number Diff line
@@ -4,36 +4,33 @@
  fetchFromGitHub,
  cmake,
  SDL2,
  sdl3,
  useSDL3 ? false,
}:

stdenv.mkDerivation rec {
  pname = "fna3d";
  version = "25.02";
  version = "25.10";

  src = fetchFromGitHub {
    owner = "FNA-XNA";
    repo = "FNA3D";
    tag = version;
    fetchSubmodules = true;
    hash = "sha256-0rRwIbOciPepo+ApvJiK5IyhMdq/4jsMlCSv0UeDETs=";
    hash = "sha256-Hbj1GGKSFaP2C7V0II6x6euxRDc/BYSK00cVsFMKGEw=";
  };

  buildInputs = [ SDL2 ];
  cmakeFlags = [
    (lib.cmakeBool "BUILD_SDL3" useSDL3)
  ];
  buildInputs = if useSDL3 then [ sdl3 ] else [ SDL2 ];
  nativeBuildInputs = [ cmake ];

  installPhase = ''
    runHook preInstall
    install -Dm755 libFNA3D.so $out/lib/libFNA3D.so
    ln -s libFNA3D.so $out/lib/libFNA3D.so.0
    ln -s libFNA3D.so $out/lib/libFNA3D.so.0.${version}
    runHook postInstall
  '';

  meta = {
    description = "Accuracy-focused XNA4 reimplementation for open platforms";
    homepage = "https://fna-xna.github.io/";
    license = lib.licenses.mspl;
    license = lib.licenses.zlib;
    platforms = lib.platforms.linux;
    mainProgram = "fna3d";
    maintainers = with lib.maintainers; [ mrtnvgr ];
  };
}