aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/plugins
diff options
context:
space:
mode:
authoryuuko <yuuko@partyvan.io>2024-08-29 21:51:04 -0700
committeryuuko <yuuko@partyvan.io>2024-08-29 21:51:04 -0700
commit56449e59d7aabd1c06fb67a51a1e129b55cb9270 (patch)
tree19f3faf805e9b6461a5940d1a050d13e5271ef55 /srcds-pkgs/plugins
break out of system config
Diffstat (limited to 'srcds-pkgs/plugins')
-rw-r--r--srcds-pkgs/plugins/Chat-Logger-Redux.nix19
-rw-r--r--srcds-pkgs/plugins/Open-Fortress-Tools.nix15
-rw-r--r--srcds-pkgs/plugins/SteamTools.nix21
-rw-r--r--srcds-pkgs/plugins/SteamWorks.nix19
-rw-r--r--srcds-pkgs/plugins/Updater.nix28
-rw-r--r--srcds-pkgs/plugins/ftz_cheats.nix14
-rw-r--r--srcds-pkgs/plugins/morecolors.nix20
-rw-r--r--srcds-pkgs/plugins/nativevotes-updated.nix16
-rw-r--r--srcds-pkgs/plugins/openfrags.nix16
-rw-r--r--srcds-pkgs/plugins/smlib.nix22
-rw-r--r--srcds-pkgs/plugins/socket.nix27
-rw-r--r--srcds-pkgs/plugins/yuuko_votes.nix13
12 files changed, 230 insertions, 0 deletions
diff --git a/srcds-pkgs/plugins/Chat-Logger-Redux.nix b/srcds-pkgs/plugins/Chat-Logger-Redux.nix
new file mode 100644
index 0000000..7acbc79
--- /dev/null
+++ b/srcds-pkgs/plugins/Chat-Logger-Redux.nix
@@ -0,0 +1,19 @@
+{ lib, buildSMPlugin, fetchFromGitHub }:
+buildSMPlugin rec {
+ pname = "Chat-Logger-Redux";
+ version = "2021-09-06";
+
+ src = fetchFromGitHub {
+ owner = "Drixevel-Archive";
+ repo = pname;
+ rev = "5a297b1f3680d2c862ba914476902105c89a9213";
+ hash = "sha256-9jVRIRKX3axPYGV0vAWpikQuEQgzIdhcAMMIO2dPWU8=";
+ };
+
+ preBuild = ''
+ # the entire set of sourcemod headers are vendored in here for some reason
+ rm /build/scripting/include/*.inc
+ # i don't even know what to say about this one
+ rm /build/scripting/{compile.{dat,bat},spcomp.exe}
+ '';
+}
diff --git a/srcds-pkgs/plugins/Open-Fortress-Tools.nix b/srcds-pkgs/plugins/Open-Fortress-Tools.nix
new file mode 100644
index 0000000..86269ab
--- /dev/null
+++ b/srcds-pkgs/plugins/Open-Fortress-Tools.nix
@@ -0,0 +1,15 @@
+{ lib, buildSMPlugin, fetchFromGitHub }:
+buildSMPlugin rec {
+ pname = "Open-Fortress-Tools";
+ version = "2024-08-22";
+
+ src = fetchFromGitHub {
+ owner = "openfortress";
+ repo = "SM-${pname}";
+ rev = "05cb78a9411843e16ddab5f651edec5f481200b1";
+ hash = "sha256-Y2uCVB2fivzQq7bC7g8KK/qiido7qopv9tcLhEr/h6w=";
+ };
+
+ removePrebuilt = false;
+ dontBuild = true;
+}
diff --git a/srcds-pkgs/plugins/SteamTools.nix b/srcds-pkgs/plugins/SteamTools.nix
new file mode 100644
index 0000000..2755fa5
--- /dev/null
+++ b/srcds-pkgs/plugins/SteamTools.nix
@@ -0,0 +1,21 @@
+{ lib, buildSMPlugin, fetchFromGitHub, runCommand }:
+let
+ pname = "SteamTools";
+ src' = fetchFromGitHub {
+ # transitional syntax fork that's been sitting in PRs for 4 years ww
+ owner = "JoinedSenses";
+ repo = pname;
+ rev = "0ce8122e5d2a453c5b4b23fb2871bc24b35e27fe";
+ hash = "sha256-Vq60/GxwlyfYgQKjnMR8CaeyfMApJIvvZWD94o4LwYc=";
+ };
+in
+buildSMPlugin /* rec */ {
+ inherit pname;
+ version = "2020-05-01";
+
+ src = runCommand "source" {} ''
+ odir=$out/scripting/include
+ mkdir -p $odir
+ cp ${src'}/plugin/steamtools.inc $odir/
+ '';
+}
diff --git a/srcds-pkgs/plugins/SteamWorks.nix b/srcds-pkgs/plugins/SteamWorks.nix
new file mode 100644
index 0000000..169f6d0
--- /dev/null
+++ b/srcds-pkgs/plugins/SteamWorks.nix
@@ -0,0 +1,19 @@
+{ buildSMPlugin, fetchFromGitHub, runCommand }:
+let
+ src' = fetchFromGitHub {
+ owner = "KyleSanderson";
+ repo = "SteamWorks";
+ rev = "f0c1b62dff615511b27824aaa2815c7dc58d2716";
+ hash = "sha256-ugjaM04Jm1MKGmdtTAYVRD+ONOevc0PHAWqxBFSeu4o=";
+ };
+in
+buildSMPlugin rec {
+ pname = "SteamWorks";
+ version = "2023-04-02";
+
+ src = runCommand "source" {} ''
+ odir=$out/scripting/
+ mkdir -p $odir
+ cp -r ${src'}/Pawn/includes $odir/include
+ '';
+}
diff --git a/srcds-pkgs/plugins/Updater.nix b/srcds-pkgs/plugins/Updater.nix
new file mode 100644
index 0000000..3c252fd
--- /dev/null
+++ b/srcds-pkgs/plugins/Updater.nix
@@ -0,0 +1,28 @@
+{ fetchzip, buildSMPlugin, ed
+, SM-neocurl-ext, SteamTools, SteamWorks, socket
+}:
+buildSMPlugin rec {
+ pname = "Updater";
+ version = "1.2.1";
+
+ src = fetchzip {
+ url = "https://forums.alliedmods.net/attachment.php?attachmentid=183438";
+ extension = "zip";
+ stripRoot = false;
+ hash = "sha256-M+kUvHzwiJXOGIdbUql5nbFdCPdzYdRM1BCq6Y8Fuls=";
+ };
+
+ nativeBuildInputs = [ ed ];
+ buildInputs = [ SM-neocurl-ext SteamTools SteamWorks socket ];
+
+ postPatch = ''
+ ed scripting/updater.sp <<EOF
+ /"sm_updater"/s/2/1/
+ w
+ EOF
+ ed scripting/updater/plugins.sp <<EOF
+ /64] /s//64], /
+ w
+ EOF
+ '';
+}
diff --git a/srcds-pkgs/plugins/ftz_cheats.nix b/srcds-pkgs/plugins/ftz_cheats.nix
new file mode 100644
index 0000000..3e8d32c
--- /dev/null
+++ b/srcds-pkgs/plugins/ftz_cheats.nix
@@ -0,0 +1,14 @@
+{ lib, fetchzip, buildSMPlugin, smlib }:
+buildSMPlugin rec {
+ pname = "ftz_cheats";
+ version = "1.1";
+
+ src = fetchzip {
+ url = "https://forums.alliedmods.net/attachment.php?attachmentid=109393";
+ extension = "zip";
+ stripRoot = false;
+ hash = "sha256-05RRJuIldc6gvYkYcpQokFwKYvR+wMCgy7KylUi1vTY=";
+ };
+
+ buildInputs = [ smlib ];
+}
diff --git a/srcds-pkgs/plugins/morecolors.nix b/srcds-pkgs/plugins/morecolors.nix
new file mode 100644
index 0000000..325b353
--- /dev/null
+++ b/srcds-pkgs/plugins/morecolors.nix
@@ -0,0 +1,20 @@
+{ lib, fetchFromGitHub, stdenvNoCC }:
+stdenvNoCC.mkDerivation rec {
+ pname = "morecolors";
+ version = "2022-07-07";
+
+ src = fetchFromGitHub {
+ owner = "DoctorMcKay";
+ repo = "sourcemod-plugins";
+ rev = "6c7ffca2b580b3b313ee2027ac4dd12b7fad226a";
+ hash = "sha256-zmwyIMSwr2BV3feuiAZhUj2SAh5C+vp/HnGufYMpu60=";
+ };
+
+ phases = [ "unpackPhase" "installPhase" ];
+
+ installPhase = ''
+ odir=$out/share/addons/sourcemod/scripting/include
+ mkdir -p $odir
+ cp scripting/include/morecolors.inc $odir/
+ '';
+}
diff --git a/srcds-pkgs/plugins/nativevotes-updated.nix b/srcds-pkgs/plugins/nativevotes-updated.nix
new file mode 100644
index 0000000..4044294
--- /dev/null
+++ b/srcds-pkgs/plugins/nativevotes-updated.nix
@@ -0,0 +1,16 @@
+{ buildSMPlugin, fetchFromGitHub }:
+buildSMPlugin rec {
+ pname = "nativevotes-updated";
+ version = "2023-10-17";
+
+ src = fetchFromGitHub {
+ owner = "sapphonie";
+ repo = "sourcemod-${pname}";
+ rev = "47d00d636fd7bee3419fb310e4c3d8674278248d";
+ sha256 = "0yvlsclhdjsy0amrff3a6y2k2bfalcyrjp57s5jnxv30gqc3d1rg";
+ };
+
+ preConfigure = ''
+ cd addons/sourcemod
+ '';
+}
diff --git a/srcds-pkgs/plugins/openfrags.nix b/srcds-pkgs/plugins/openfrags.nix
new file mode 100644
index 0000000..07bb629
--- /dev/null
+++ b/srcds-pkgs/plugins/openfrags.nix
@@ -0,0 +1,16 @@
+{ buildSMPlugin, fetchFromGitHub
+, Updater, morecolors, Open-Fortress-Tools
+}:
+buildSMPlugin rec {
+ pname = "openfrags";
+ version = "2.2";
+
+ src = fetchFromGitHub {
+ owner = "TheRatest";
+ repo = pname;
+ rev = "3cece524f0b91364300c8c8618d41430af86be95";
+ hash = "sha256-qK3zcQm8+FA/xA0gFMlo2K6d+u+mpupMLyToOG3eMeg=";
+ };
+
+ buildInputs = [ morecolors Updater Open-Fortress-Tools ];
+}
diff --git a/srcds-pkgs/plugins/smlib.nix b/srcds-pkgs/plugins/smlib.nix
new file mode 100644
index 0000000..5f283c9
--- /dev/null
+++ b/srcds-pkgs/plugins/smlib.nix
@@ -0,0 +1,22 @@
+{ fetchFromGitHub, buildSMPlugin }:
+buildSMPlugin rec {
+ pname = "smlib";
+ version = "2022-01-11";
+
+ src = fetchFromGitHub {
+ owner = "bcserv";
+ repo = pname;
+ # transitional_syntax branch
+ rev = "2c14acb85314e25007f5a61789833b243e7d0cab";
+ hash = "sha256-yonYBCaEZGjbxhKvQ2NNVBpiUqyMxuchEgL+bsWomuo=";
+ };
+
+ postPatch = ''
+ sed -i \
+ '/#include <sdktools_entinput>/a #include <sdktools_variant_t>' \
+ scripting/include/smlib/entities.inc
+ '';
+
+ # technically unnecessary as buildPhase simply won't find anything to build
+ dontBuild = true;
+}
diff --git a/srcds-pkgs/plugins/socket.nix b/srcds-pkgs/plugins/socket.nix
new file mode 100644
index 0000000..5a7cdc2
--- /dev/null
+++ b/srcds-pkgs/plugins/socket.nix
@@ -0,0 +1,27 @@
+{ buildSMPlugin, fetchFromGitHub, runCommand }:
+let
+ src' = fetchFromGitHub {
+ owner = "nefarius";
+ repo = "sm-ext-socket";
+ rev = "ed6bf7a12bd3f801610592301e12062b367fa27b";
+ hash = "sha256-M13Nt58tlXXBO1fB2Y3vQLyD4Wlzrwd6mHWSf5JTUwY=";
+ };
+ /*
+ socket.src = fetchzip {
+ url = "http://forums.alliedmods.net/attachment.php?attachmentid=83286";
+ extension = "zip";
+ stripRoot = false;
+ hash = "sha256-EDCEyzSynz8Uotgx6xVmEiGgXf1FBtOzW1YNfsOad+U=";
+ };
+ */
+in
+buildSMPlugin rec {
+ pname = "socket";
+ version = "2018-11-14";
+
+ src = runCommand "source" {} ''
+ odir=$out/scripting/include
+ mkdir -p $odir
+ cp ${src'}/socket.inc $odir/
+ '';
+}
diff --git a/srcds-pkgs/plugins/yuuko_votes.nix b/srcds-pkgs/plugins/yuuko_votes.nix
new file mode 100644
index 0000000..fb11fad
--- /dev/null
+++ b/srcds-pkgs/plugins/yuuko_votes.nix
@@ -0,0 +1,13 @@
+{ lib, buildSMPlugin, fetchgit, SM-Memory }:
+buildSMPlugin rec {
+ pname = "yuuko_votes";
+ version = "2024-08-12";
+
+ src = fetchgit {
+ url = "https://git.partyvan.io/yuuko_votes";
+ rev = "acafa384e1dfec7d877bc4fcac0dc78e8f9429db";
+ hash = "sha256-PNCl9oM2j0CSiJp6jt0Cn9gGwGsbwmZ55xt/m05Tmzc=";
+ };
+
+ buildInputs = [ SM-Memory ];
+}