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/plugins/Chat-Logger-Redux.nix | 19 +++++++++++++++++++ srcds-pkgs/plugins/Open-Fortress-Tools.nix | 15 +++++++++++++++ srcds-pkgs/plugins/SteamTools.nix | 21 +++++++++++++++++++++ srcds-pkgs/plugins/SteamWorks.nix | 19 +++++++++++++++++++ srcds-pkgs/plugins/Updater.nix | 28 ++++++++++++++++++++++++++++ srcds-pkgs/plugins/ftz_cheats.nix | 14 ++++++++++++++ srcds-pkgs/plugins/morecolors.nix | 20 ++++++++++++++++++++ srcds-pkgs/plugins/nativevotes-updated.nix | 16 ++++++++++++++++ srcds-pkgs/plugins/openfrags.nix | 16 ++++++++++++++++ srcds-pkgs/plugins/smlib.nix | 22 ++++++++++++++++++++++ srcds-pkgs/plugins/socket.nix | 27 +++++++++++++++++++++++++++ srcds-pkgs/plugins/yuuko_votes.nix | 13 +++++++++++++ 12 files changed, 230 insertions(+) create mode 100644 srcds-pkgs/plugins/Chat-Logger-Redux.nix create mode 100644 srcds-pkgs/plugins/Open-Fortress-Tools.nix create mode 100644 srcds-pkgs/plugins/SteamTools.nix create mode 100644 srcds-pkgs/plugins/SteamWorks.nix create mode 100644 srcds-pkgs/plugins/Updater.nix create mode 100644 srcds-pkgs/plugins/ftz_cheats.nix create mode 100644 srcds-pkgs/plugins/morecolors.nix create mode 100644 srcds-pkgs/plugins/nativevotes-updated.nix create mode 100644 srcds-pkgs/plugins/openfrags.nix create mode 100644 srcds-pkgs/plugins/smlib.nix create mode 100644 srcds-pkgs/plugins/socket.nix create mode 100644 srcds-pkgs/plugins/yuuko_votes.nix (limited to 'srcds-pkgs/plugins') 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 </a #include ' \ + 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 ]; +} -- cgit v1.2.3