aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/plugins/Updater.nix
blob: 3c252fdbd7c93b16de15895bf5f5197f8bceff89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
  '';
}