vangers: fix cmake 4 build, modernize (#453122)

This commit is contained in:
Yohann Boniface
2025-10-23 21:19:03 +00:00
committed by GitHub
+21 -5
View File
@@ -4,6 +4,7 @@
callPackage,
stdenv,
cmake,
installShellFiles,
SDL2,
SDL2_net,
libogg,
@@ -26,6 +27,14 @@ stdenv.mkDerivation {
hash = "sha256-IhCQh60wBzaRsj72Y8NUHrv9lvss0fmgHjzrO/subOI=";
};
postPatch = ''
substituteInPlace CMakeLists.txt --replace-fail \
"CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)" \
"CMAKE_MINIMUM_REQUIRED(VERSION 4.0)"
'';
strictDeps = true;
buildInputs = [
SDL2
SDL2_net
@@ -35,13 +44,20 @@ stdenv.mkDerivation {
clunk
zlib
];
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [
cmake
installShellFiles
];
installPhase = ''
mkdir -p $out/bin
install -T -m755 server/vangers_server $out/bin/vangers_server
install -T -m755 src/vangers $out/bin/vangers
install -T -m755 surmap/surmap $out/bin/surmap
runHook preInstall
installBin server/vangers_server
installBin src/vangers
installBin surmap/surmap
runHook postInstall
'';
meta = {