From 56449e59d7aabd1c06fb67a51a1e129b55cb9270 Mon Sep 17 00:00:00 2001 From: yuuko Date: Thu, 29 Aug 2024 21:51:04 -0700 Subject: break out of system config --- srcds-pkgs/sourcemod/default.nix | 82 ++++++++++++++++++++++++++++++++++++++ srcds-pkgs/sourcemod/setup-hook.sh | 16 ++++++++ 2 files changed, 98 insertions(+) create mode 100644 srcds-pkgs/sourcemod/default.nix create mode 100644 srcds-pkgs/sourcemod/setup-hook.sh (limited to 'srcds-pkgs/sourcemod') diff --git a/srcds-pkgs/sourcemod/default.nix b/srcds-pkgs/sourcemod/default.nix new file mode 100644 index 0000000..90c31f9 --- /dev/null +++ b/srcds-pkgs/sourcemod/default.nix @@ -0,0 +1,82 @@ +{ lib, multiStdenv, pkgsi686Linux +, writeShellScript +, fetchFromGitHub, ed +, hl2sdk, ambuild, metamod-source, libfinite +, mysql_5_5 +}: let + inherit (pkgsi686Linux) zlib; + owner = "alliedmodders"; + buildno = "6968"; +in multiStdenv.mkDerivation rec { + pname = "sourcemod"; + version = "1.11_${buildno}"; + + src = fetchFromGitHub rec { + inherit owner; + repo = pname; + rev = "13510eab809a98b6a62354fc9848641"; + fetchSubmodules = true; + hash = "sha256-leV0Q7g5bnJljzQxv3z6t5p/1d9TxILPvIuSYuq8LmE="; + }; + + nativeBuildInputs = [ ambuild ed ]; + buildInputs = [ zlib mysql_5_5 ]; + + hardeningDisable = [ "all" ]; + + CXXFLAGS="-Wno-error=sign-compare -Wno-error=ignored-attributes"; + + postPatch = '' + mkdir .git + echo "ref: refs/heads/main" > .git/HEAD + ed tools/buildbot/generate_headers.py <