update sourcemod

This commit is contained in:
Robin Appelman 2025-06-20 13:12:54 +02:00
commit 40d16cd6e9

View file

@ -1,5 +1,5 @@
{
clangStdenv,
stdenv,
fetchFromGitHub,
ambuild,
metamod-source,
@ -19,22 +19,25 @@
"x86_64-linux" = "x86_64";
"i686-linux" = "x86";
};
ambuildArch = ambuildArchs.${clangStdenv.system};
ambuildArch = ambuildArchs.${stdenv.system};
sdkNames = concatStringsSep "," (attrNames sdks);
# ambuild doesn't allow configuring a target prefix for "ar"
arWrapper = writeShellScriptBin "ar" "exec -a $0 ${clangStdenv.cc.targetPrefix}ar $@";
arWrapper = writeShellScriptBin "ar" "exec -a $0 ${stdenv.cc.targetPrefix}ar $@";
in
clangStdenv.mkDerivation rec {
stdenv.mkDerivation rec {
pname = "sourcemod";
version = "1.11";
version = "1.12";
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-const-int-float-conversion -Wno-error=tautological-overlap-compare -Wno-error=deprecated-non-prototype";
NIX_CFLAGS_COMPILE =
"-Wno-error=format-truncation -Wno-error=ignored-attributes -Wno-error=reorder -Wno-error=sign-compare "
+ "-Wno-error=stringop-truncation -Wno-error=dangling-pointer -Wno-error=template-id-cdtor -Wno-error=format-security "
+ "-Wno-error=deprecated-declarations -Wno-error=stringop-overread";
src = fetchFromGitHub {
owner = "alliedmodders";
repo = pname;
rev = "b09a675eb01c65dd95d7ac1a522fb62";
sha256 = "sha256-FQBYxBt2AoM7OQYhz+qZuLddT9tIfW7ZlRg1Zkd5qE0=";
rev = "5c407d494889dd1b6b2187bbc31ac82";
sha256 = "sha256-e9qlBMHCMbG1F+yacO4p4+nm32wfBoVPsIqwR79agWw=";
fetchSubmodules = true;
};
@ -42,14 +45,12 @@ in
[
ambuild
]
++ optionals (clangStdenv.cc.targetPrefix != "") [arWrapper];
++ optionals (stdenv.cc.targetPrefix != "") [arWrapper];
buildInputs = [
zlib
];
# hardeningDisable = [ "all" ];
configurePhase = ''
mkdir build
cd build