aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/extensions
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/extensions
break out of system config
Diffstat (limited to 'srcds-pkgs/extensions')
-rw-r--r--srcds-pkgs/extensions/SM-Memory.nix51
-rw-r--r--srcds-pkgs/extensions/SM-neocurl-ext.nix43
2 files changed, 94 insertions, 0 deletions
diff --git a/srcds-pkgs/extensions/SM-Memory.nix b/srcds-pkgs/extensions/SM-Memory.nix
new file mode 100644
index 0000000..5d1761a
--- /dev/null
+++ b/srcds-pkgs/extensions/SM-Memory.nix
@@ -0,0 +1,51 @@
+{ lib, multiStdenv, fetchFromGitHub
+, metamod-source, sourcemod, ambuild
+, ed
+}:
+multiStdenv.mkDerivation rec {
+ pname = "SM-Memory";
+ version = "1.5.1";
+
+ src = fetchFromGitHub {
+ owner = "Scags";
+ repo = pname;
+ rev = "V${version}";
+ sha256 = "031nbx18hhqgnryzy00rv5bc8v1k7fbkb3677ndm7nkif13p12aa";
+ };
+
+ nativeBuildInputs = [ ambuild sourcemod ed ];
+
+ patchPhase = ''
+ pushd pawn/sourcemod/scripting
+ substituteInPlace memtest_{func,vec}.sp --replace smmem_ smmem/
+ ed memtest.sp <<EOF
+ /#include/a
+ #include <smmem/dynlib.inc>
+ .
+ w
+ EOF
+ popd
+ '';
+
+ configurePhase = ''
+ cd build
+ python ../configure.py \
+ --sm-path ${sourcemod.src} \
+ --mms-path ${metamod-source.src}
+ '';
+
+ buildPhase = ''
+ ambuild
+ pushd package/addons/sourcemod/scripting
+ mkdir -p ../plugins/disabled
+ for i in *.sp; do
+ spcomp -i include $i -o ../plugins/disabled/''${i%.sp}.smx
+ done
+ popd
+ '';
+
+ installPhase = ''
+ mkdir $out
+ mv package $out/share
+ '';
+}
diff --git a/srcds-pkgs/extensions/SM-neocurl-ext.nix b/srcds-pkgs/extensions/SM-neocurl-ext.nix
new file mode 100644
index 0000000..8ac2e02
--- /dev/null
+++ b/srcds-pkgs/extensions/SM-neocurl-ext.nix
@@ -0,0 +1,43 @@
+# pkgsi686Linux.pkgsStatic.callPackage
+{ lib, multiStdenv, fetchgit, ed
+, metamod-source, sourcemod, ambuild, pkg-config, pkg-config-unwrapped
+, pkgsi686Linux
+}:
+multiStdenv.mkDerivation rec {
+ pname = "SM-neocurl-ext";
+ version = "2.0.1";
+
+ src = fetchgit {
+ url = "https://git.partyvan.io/${pname}";
+ rev = "0f0f543d79966fc938b3205e5273820e4c2edc56";
+ hash = "sha256-zRZddNWc6rl4E/StpTuwtMoL0GVuPRAbcihJ0ViKddo=";
+ };
+
+ patchPhase = ''
+ ed AMBuilder <<EOF
+ g/pkg_config/s/static/dynamic/
+ w
+ EOF
+ '';
+
+ nativeBuildInputs = [ ed ambuild sourcemod pkg-config pkg-config-unwrapped ];
+ buildInputs = with pkgsi686Linux; [ openssl curl curl.dev ];
+
+ configurePhase = ''
+ mkdir build
+ cd build
+ python ../configure.py \
+ --sm-path ${sourcemod.src} \
+ --mms-path ${metamod-source.src}
+ '';
+
+ buildPhase = ''
+ ambuild
+ '';
+
+ installPhase = ''
+ mkdir -p $out
+ cp -r package $out/share
+ '';
+}
+ \ No newline at end of file