aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/plugins/Updater.nix
diff options
context:
space:
mode:
Diffstat (limited to 'srcds-pkgs/plugins/Updater.nix')
-rw-r--r--srcds-pkgs/plugins/Updater.nix28
1 files changed, 28 insertions, 0 deletions
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
+ '';
+}