updates, build fixes

This commit is contained in:
Robin Appelman 2026-11-20 22:40:15 +01:00
commit dcd65578b5
21 changed files with 179 additions and 175 deletions

12
flake.lock generated
View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1783352529, "lastModified": 1794865725,
"narHash": "sha256-FZDPaZdAAjFbJWR/BoWCCVYB16WV0b472vhUPlQawh0=", "narHash": "sha256-YJ2D++LP38iOxALjoyU0+sLkB1DMzZC6LyyDFDNENXc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "flakelight", "repo": "flakelight",
"rev": "da36ab2f725feb14b287ff1d6d56f6fc8ce6be5a", "rev": "cc76eba994e4936c567d29a67add3649e882a534",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -22,11 +22,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1783389287, "lastModified": 1795137884,
"narHash": "sha256-0xIy4dVLqq47rA+mRy0hXDfjhQd4E5PoIns/RmB7nR4=", "narHash": "sha256-iKXCN36qYfBni+3nH4vAd98/kshoIsPB2S9mYWhma30=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0ad6f47ea4fe188f4bc8f0380f93ae8523337c6c", "rev": "ab5c18fdedfc8f9bbc9d773f10a540790e2787a7",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -49,6 +49,7 @@
inheritPkgs [ inheritPkgs [
"ambuild" "ambuild"
"sourcepawn" "sourcepawn"
"metamod-source"
"sourcemod" "sourcemod"
"sourcemod-includes" "sourcemod-includes"
"sourcemod-include-curl" "sourcemod-include-curl"
@ -131,7 +132,7 @@
}; };
devShells.default = {pkgs, ...}: { devShells.default = {pkgs, ...}: {
packages = with pkgs; [nix-update]; packages = with pkgs; [nix-update depotdownloader];
}; };
}; };
} }

View file

@ -1,65 +1,45 @@
{ {
fetchFromGitHub, fetchFromGitHub,
fetchzip,
stdenv, stdenv,
writeScript, writeScript,
amtl, ambuild,
sourcemod, sourcemod,
metamod-source, metamod-source,
sourcepawn, sourcepawn,
boost186, hl2sdk,
}: let }: let
msinttypes = fetchzip { ambuildArchs = {
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/msinttypes/msinttypes-r26.zip"; "x86_64-linux" = "x64";
hash = "sha256-uMSuHXikaHQSt35FQ3o5uUjTjyP950O0DYTtQstbBvo="; "i686-linux" = "x86";
stripRoot = false;
}; };
ambuildArch = ambuildArchs.${stdenv.system};
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "sourcemod-addon-socket"; pname = "sourcemod-addon-socket";
version = "3.0.1"; version = "1.0.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nefarius"; owner = "ProjectSky";
repo = "sm-ext-socket"; repo = "sm-ext-socket";
rev = "ed6bf7a12bd3f801610592301e12062b367fa27b"; rev = finalAttrs.version;
hash = "sha256-M13Nt58tlXXBO1fB2Y3vQLyD4Wlzrwd6mHWSf5JTUwY="; hash = "sha256-9Y0r/hTNOqsccl6F1xgxuMWcT2GCy3r3OqiKElmpU2g=";
fetchSubmodules = true;
}; };
postPatch = '' nativeBuildInputs = [ambuild];
substituteInPlace Makefile \
--replace-fail " -m32" "" \
--replace-fail "LINK = -lpthread -Wl,-Bstatic -static-libgcc -lboost_thread -lboost_system -lstdc++ -Wl,-Bdynamic" \
"LINK = -lpthread -lboost_thread -lstdc++" \
substituteInPlace Socket.cpp \ NIX_CFLAGS_COMPILE = "-Wno-error=format-security";
--replace-fail "boost::system::posix_error" "boost::system::errc"
'';
nativebuildInputs = [
boost186
];
buildInputs = [
boost186
sourcemod.dev
amtl
msinttypes
sourcepawn.dev
metamod-source.dev
];
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
mkdir -p $out/addons/sourcemod/extensions/x64 mkdir build
mkdir -p $out/addons/sourcemod/scripting/include cd build
cp Release/socket.ext.so $out/addons/sourcemod/extensions/x64 cp ../AMBuildScript ../../
cp socket.inc $out/addons/sourcemod/scripting/include python ../configure.py --enable-optimize --sm-path ${sourcemod.src} --targets ${ambuildArch}
ambuild
cp -r package $out
runHook postInstall runHook postInstall
''; '';
passthru = {
updateScript = writeScript "update-null" "";
};
}) })

View file

@ -14,12 +14,12 @@
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "sourcemod-addon-sourcetvmanager"; pname = "sourcemod-addon-sourcetvmanager";
version = "1.3-beta1"; version = "1.3.0-beta00";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "peace-maker"; owner = "peace-maker";
repo = "sourcetvmanager"; repo = "sourcetvmanager";
rev = "v${finalAttrs.version}"; rev = "v${finalAttrs.version}";
hash = "sha256-4yhVwwouaMCvviwnuyhEMhzwZlBlObNZQg6KrMa86hQ="; hash = "sha256-8tb9UPZS+5YuYuTXeyaQx85y4j56CBWEoTHfiXWPVvk=";
fetchSubmodules = true; fetchSubmodules = true;
}; };

View file

@ -20,7 +20,7 @@ in
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "moonexpr"; owner = "moonexpr";
repo = "SteamWorks"; repo = "SteamWorks";
tag = "x86_64-support"; rev = "1dcfd1f232cb9783e3f30fb7f79401c4905e8a71";
hash = "sha256-SvyXsVL+JuJmxO0ox5fyAlmt9Ir52U/uCJ8HbUNA5Oc="; hash = "sha256-SvyXsVL+JuJmxO0ox5fyAlmt9Ir52U/uCJ8HbUNA5Oc=";
}; };

View file

@ -7,13 +7,13 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "ambuild"; pname = "ambuild";
version = "2.2-unstable-2026-06-06"; version = "2.2-unstable-2026-11-08";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "alliedmodders"; owner = "alliedmodders";
repo = pname; repo = pname;
rev = "d89ec91a7ac2607da07b50bb62346f9a10e9a998"; rev = "5b0aa725beef33c9cf6a1b00659a010c3d9120d3";
hash = "sha256-AO9n+YaVaV9h2JNeaNKlLLPdXyA6HwQpcHCt0UCVIII="; hash = "sha256-78jzcuMypwiDDmOqf3mKbkqHySUBGVG0xb4yY7un9EA=";
}; };
pyproject = true; pyproject = true;

View file

@ -5,13 +5,13 @@
"platforms": ["i686-linux", "x86_64-linux"] "platforms": ["i686-linux", "x86_64-linux"]
}, },
"tf2": { "tf2": {
"rev": "f8ec7a5644b58ff0c8dcd94d8b7501b447f5a82d", "rev": "631a7b6c0cbbb6941cf22e434620911a0bdfd478",
"sha256": "sha256-xh8T8bzEUL23mGnpTA4xlhLeVkf9OxMp2MhaBlGayQ4=", "sha256": "sha256-ImyBzhrKfk24yyvqrukRw+67IeAJ4Qf5mGg0vT1EJSU=",
"platforms": ["i686-linux", "x86_64-linux"] "platforms": ["i686-linux", "x86_64-linux"]
}, },
"cs2": { "cs2": {
"rev": "f5836f20c033109d57fb08346bda80d614888488", "rev": "3f4110dce3060b352d49bf100f1a43f7705aab06",
"sha256": "sha256-Gka6W6Oc7LMskOXvLNfVsHDU6FRa6bWSnVkqUSc0Mfg=", "sha256": "sha256-axHPq5hUOFF6APR8auj9I1MBM8tj6Zm2vR/KVWZJZAI=",
"platforms": ["x86_64-linux"] "platforms": ["x86_64-linux"]
}, },
"swarm": { "swarm": {
@ -43,8 +43,8 @@
"platforms": ["i686-linux"] "platforms": ["i686-linux"]
}, },
"darkm": { "darkm": {
"rev": "016cfd4f95e58f94131594a12b5a3aac9cd33f20", "rev": "6f0c3d9d8ef4fb1f897b2adfaec4226d7b0716d7",
"sha256": "sha256-XX/IhmkVV31c25CdTTItAdcSds2ZlWMhqDzd34BcaoU=", "sha256": "sha256-fCC+xtamxTv5j/a2lqPnfP2G/AoZ8FY1OEulzaNF/II=",
"platforms": ["i686-linux"] "platforms": ["i686-linux"]
}, },
"eye": { "eye": {
@ -53,8 +53,8 @@
"platforms": ["i686-linux"] "platforms": ["i686-linux"]
}, },
"bms": { "bms": {
"rev": "51cd3e7b0b7fc81d672159c99299910a30b4c9ce", "rev": "69fe26fed5ad34cb6ef032c57a54f8efbcdd8849",
"sha256": "sha256-RakfA20fk2VTtRne7NCl2UX8Q+5WRgeH5bBGIYe1f+Q=", "sha256": "sha256-2RmGeUlny9K4oCa1jBxEpKnnozsIRZAQls1V/RUngqI=",
"platforms": ["i686-linux"] "platforms": ["i686-linux"]
}, },
"l4d": { "l4d": {
@ -78,8 +78,8 @@
"platforms": ["i686-linux"] "platforms": ["i686-linux"]
}, },
"pvkii": { "pvkii": {
"rev": "f06b74a1d44116613e398787974b78e51fb1c8b8", "rev": "f65b48326a73aafe9f15eb238c2fe3fe4c82d0d1",
"sha256": "sha256-wfgTfFuxYCHdMzuvI5w/Xw/MGVYWmsWB7uWtttShHTM=", "sha256": "sha256-hKWB5Nq+hoe8Q623fLann1pLuktfHOck2u5O4joG1+Y=",
"platforms": ["i686-linux"] "platforms": ["i686-linux"]
}, },
"episode1": { "episode1": {
@ -88,38 +88,38 @@
"platforms": ["i686-linux"] "platforms": ["i686-linux"]
}, },
"dota": { "dota": {
"rev": "ab11e586227623183bf6e7fa5e988fcb71080efb", "rev": "00edcdc8173a29b433d772dccf8338b8c876d0ab",
"sha256": "sha256-X5aqTMFTf9TjZS17pWh84KNshQ5F68r0tnX6hD/glNA=", "sha256": "sha256-J8TTzVysgNIhwLvWFrYGFZvrWJN2YkHcdXdGHFzYUF8=",
"platforms": ["i686-linux"] "platforms": ["i686-linux"]
}, },
"mcv": { "mcv": {
"rev": "0b085deb66af320cee4046d5f5a89dfb044a2811", "rev": "e83260bc8de65d07a5fb73b5c2686a98e9927b2e",
"sha256": "sha256-stg1NVl+l5/MjeY8lVrSR/OVsBHyT2do6VEcOPNF9MY=", "sha256": "sha256-sahlVB57wB1SdhbgUyLSGyz7auu5mdKcKnNkab8Owxo=",
"platforms": ["i686-linux"] "platforms": ["i686-linux"]
}, },
"dods": { "dods": {
"rev": "ece187a8147a8159c16f88305e3523cef6475ecf", "rev": "cbc97391097ed5c2790ab3fac6f9d05661d3a10f",
"sha256": "sha256-GAVs8ENKFde9BPQx9VAqdlFRiYe4DfbTHs8I+KJpoyc=", "sha256": "sha256-fPhI70N4iuQWc7kHExldrUpHU4uxr1zdHx0d04sPmJs=",
"platforms": ["i686-linux", "x86_64-linux"] "platforms": ["i686-linux", "x86_64-linux"]
}, },
"sdk2013": { "sdk2013": {
"rev": "4c56ee5bc8bfe00793abb7d40eb3f6fb040f10d2", "rev": "7c5bfe038ec70f11814b5d15c4ca9b6403e97b05",
"sha256": "sha256-aWrQt7XIpXiomDICcSSqyxYsRZgpHnwX7eIX4o2V5jE=", "sha256": "sha256-ckvEgdyOsu2tsDIQYP/ALLvJkKOlUv6URBoFqHeBfHA=",
"platforms": ["i686-linux", "x86_64-linux"] "platforms": ["i686-linux", "x86_64-linux"]
}, },
"hl2dm": { "hl2dm": {
"rev": "af883d5052349f09fbe641c99149b84769a62d01", "rev": "11dca0f12e53089b9dee6511f6b8ff4d02c9d51d",
"sha256": "sha256-GAVs8ENKFde9BPQx9VAqdlFRiYe4DfbTHs8I+KJpoyc=", "sha256": "sha256-Mof4QQDi67KumtZwegUtUly3btKtCrLZN7hXnRo+9ZI=",
"platforms": ["i686-linux", "x86_64-linux"] "platforms": ["i686-linux", "x86_64-linux"]
}, },
"l4d2": { "l4d2": {
"rev": "f48f11d80d599b41f75c506c2edfc81fe9935e9a", "rev": "ee978cde412bb8720453f1f89e5748ec1449a4b3",
"sha256": "sha256-cp0h2YlWSIfRyh+amIV8kyBLJ/oIXOkG7zsH3Wx8zZI=", "sha256": "sha256-fCVl6M5egu3adxA/9dQxokPx5gq9pKv7fLAbv+I73FA=",
"platforms": ["i686-linux"] "platforms": ["i686-linux"]
}, },
"css": { "css": {
"rev": "64895cf48c68f5cef0470ee3f13ec449babc30ea", "rev": "47f0ea659bc70718f9c41a7830b6ad943a68ba09",
"sha256": "sha256-8+k8Vg5R5/2kUcTSLRTY71rZ+MvCuSppLcfD+aUVuW0=", "sha256": "sha256-fPhI70N4iuQWc7kHExldrUpHU4uxr1zdHx0d04sPmJs=",
"platforms": ["i686-linux", "x86_64-linux"] "platforms": ["i686-linux", "x86_64-linux"]
}, },
"doi": { "doi": {
@ -128,8 +128,8 @@
"platforms": ["i686-linux"] "platforms": ["i686-linux"]
}, },
"deadlock": { "deadlock": {
"rev": "0af9332394a4eb3fb904610543d266f54b7ad820", "rev": "a3c3c30d717037a92deea204c1bc748823f8ed31",
"sha256": "sha256-WbOVrECtCKUwZEdoGV9c80t3gU6WopKVS89N7cKdhjg=", "sha256": "sha256-XEgahMqrhE+RK5LdutKkRpVioXzifqNLKjzgGtdTBlo=",
"platforms": ["x86_64-linux"] "platforms": ["x86_64-linux"]
} }
} }

View file

@ -5,13 +5,13 @@
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "sourcemod-includes"; pname = "sourcemod-includes";
version = "1.12.0.7239"; version = "1.12.0.7260";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "alliedmodders"; owner = "alliedmodders";
repo = "sourcemod"; repo = "sourcemod";
rev = "b951843d42f7b9204615c14885468ea131a24002"; rev = "3f7460671f7adc4a3c6791a47d21ba3e7b5fba91";
hash = "sha256-GlAi9V78uTSyOfMfHVtEq+RYM31Y0SOUllGXUI2rYGU="; hash = "sha256-bz+/A32iqgl0VPFCdP7SYFqO3wEOjSMkQaVlpSRiRG0=";
}; };
doConfigure = false; doConfigure = false;

View file

@ -5,6 +5,7 @@
git, git,
fetchpatch2, fetchpatch2,
symlinkJoin, symlinkJoin,
nix-update-script,
}: sdks: let }: sdks: let
inherit (builtins) attrNames concatStringsSep attrValues; inherit (builtins) attrNames concatStringsSep attrValues;
sdkNames = concatStringsSep "," (attrNames sdks); sdkNames = concatStringsSep "," (attrNames sdks);
@ -57,4 +58,13 @@ in
cp -r $src/public $dev/public cp -r $src/public $dev/public
ln -s $dev/public $dev/include ln -s $dev/public $dev/include
''; '';
passthru = {
updateScript = nix-update-script {
extraArgs = [
"--flake"
"--use-github-releases"
];
};
};
}) })

View file

@ -1,7 +1,7 @@
{mkSpirePlugin}: {mkSpirePlugin}:
mkSpirePlugin { mkSpirePlugin {
name = "autoexec"; name = "autoexec";
version = "0.2-unstable-2026-02-03"; version = "0.2-unstable-2026-07-23";
rev = "9ef880d8cd3d2ad362aa42d7f8a77a8161cabb4d"; rev = "f637234a5defc5c93360e09e06c935ad7ebdb48f";
hash = "sha256-RxQzFMSudQIOa6f/qaCjPS4qA1cgx0voZYBcHhe2UpU="; hash = "sha256-KP6CADRrzhPRqEw5sPajW5kWTJsUpkfPbWyWp9cIpyA=";
} }

View file

@ -1,11 +1,12 @@
{ {
mkSpirePlugin, mkSpirePlugin,
sourcemod-addon-curl, sourcemod-include-curl,
sourcemod-include-json,
}: }:
mkSpirePlugin { mkSpirePlugin {
name = "banned"; name = "banned";
version = "0-unstable-2026-06-18"; version = "0-unstable-2026-11-18";
rev = "c8186c7bd56e15f2e2e8e5988c0d18058a02df8b"; rev = "184accea521e36fff2fa05d4c10719384c939e2c";
hash = "sha256-JA9WeM0Je0aHB/z+6xImztTouJNGkaPwD9Cp4z8Ko+4="; hash = "sha256-+xHA5awx0JEM6uyZOfLVjBVPQYt4uIb96xZpIAQIMAo=";
runtimeInputs = [sourcemod-addon-curl]; runtimeInputs = [sourcemod-include-curl sourcemod-include-json];
} }

View file

@ -24,12 +24,12 @@ lib.extendMkDerivation {
}; };
in { in {
pname = "sourcemod-plugin-${name}"; pname = "sourcemod-plugin-${name}";
version = "20260702-1782977488895-unstable-2026-07-02"; version = "20261120-1795172513591-unstable-2026-11-20";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "F2"; owner = "F2";
repo = "F2s-sourcemod-plugins"; repo = "F2s-sourcemod-plugins";
rev = "2be8d34329603569a2848f66b68f3ca323c9d937"; rev = "7c7b22e7daf6e7aae877a4ba48c08eb8fb572cfc";
hash = "sha256-XN/LBD3P3tWTI9xwO0+a6+dRH4kyDUTNhGWs2FCCHd0="; hash = "sha256-se9g5lFXzj75gLHPFiyEyh29DtQ9uFFE23741LaGF/Q=";
}; };
plugins = ["${name}/${name}.sp"]; plugins = ["${name}/${name}.sp"];

View file

@ -6,7 +6,7 @@
}: }:
mkSourcemodPlugin (finalAttrs: { mkSourcemodPlugin (finalAttrs: {
pname = "sourcemod-plugin-demostf"; pname = "sourcemod-plugin-demostf";
version = "1.18.1"; version = "0-unstable-2024-01-27";
src = fetchFromGitea { src = fetchFromGitea {
domain = "codeberg.org"; domain = "codeberg.org";
owner = "demostf"; owner = "demostf";

View file

@ -5,20 +5,16 @@
}: }:
mkSourcemodPlugin (finalAttrs: { mkSourcemodPlugin (finalAttrs: {
pname = "sourcemod-plugin-extend-humiliation"; pname = "sourcemod-plugin-extend-humiliation";
version = "0-unstable-2026-07-10"; version = "0-unstable-2026-11-20";
src = fetchFromGitea { src = fetchFromGitea {
domain = "codeberg.org"; domain = "codeberg.org";
owner = "spire"; owner = "spire";
repo = "docker-comp-server"; repo = "docker-comp-server";
rev = "1c0884386cf97d61e0699cffb072fbabdfc59cbf"; rev = "a7c238096c140fedb42ee6cbe3d8c8cbd743cef4";
hash = "sha256-IKtDtcQhvoexuMSJcgkmNMVrfcBapM6NTar96CMzyvc="; hash = "sha256-KmL7NuXWwiHpANxkgP9kH3e//X+rregmmZMKRgwg08Q=";
}; };
preInstall = '' plugins = ["plugin/ExtendHumiliation.sp"];
rm pause.smx
'';
plugins = ["ExtendHumiliation.sp"];
passthru = { passthru = {
updateScript = nix-update-script { updateScript = nix-update-script {

View file

@ -4,8 +4,8 @@
}: }:
mkSpirePlugin { mkSpirePlugin {
name = "mapdownloader"; name = "mapdownloader";
version = "0-unstable-2025-10-27"; version = "0-unstable-2026-10-14";
rev = "06dbac41712bd62ae3aa1fd442ab2265ee2f488f"; rev = "ef51d4c9fc778dd7d89b87a4cd08e197b7f7304f";
hash = "sha256-aNlrxrv2K73lKP7hYOER3um4P6fbiV/nF4GDcVaUNbo="; hash = "sha256-y36ZlM2wMIfDuoOgUXO+6ys2TTd4TutNZAtSjgqL3gA=";
runtimeInputs = [sourcemod-addon-curl]; runtimeInputs = [sourcemod-addon-curl];
} }

View file

@ -1,7 +1,7 @@
{mkSpirePlugin}: {mkSpirePlugin}:
mkSpirePlugin { mkSpirePlugin {
name = "nochat"; name = "nochat";
version = "0-unstable-2026-03-28"; version = "0-unstable-2026-10-28";
rev = "7c161d4eef058bf3e59146a37ff6ca16594e013b"; rev = "9fdf278be98f67ec1f24d84c3c2ae1fb9bcd8f18";
hash = "sha256-cO64QGlM8oGVGaDgac74VjIFLrNe8aPrOo3tvrSD4Eo="; hash = "sha256-nhfSLzCLVZlEcDUY5iwnzTCxbKnr3+PqMw9LwfYHtak=";
} }

View file

@ -7,10 +7,10 @@
}: }:
mkSourcemodPlugin (finalAttrs: { mkSourcemodPlugin (finalAttrs: {
pname = "sourcemod-plugin-soap-tf2dm"; pname = "sourcemod-plugin-soap-tf2dm";
version = "4.4.8"; version = "4.5.0b";
src = fetchzip { src = fetchzip {
url = "https://github.com/sapphonie/SOAP-TF2DM/releases/download/v${finalAttrs.version}/soap.zip"; url = "https://github.com/sapphonie/SOAP-TF2DM/releases/download/v${finalAttrs.version}/soap.zip";
sha256 = "sha256-7tzYmJn7iUCwKwni2zZCxDAwixoxyW5iXZ82ppsUxE8="; sha256 = "sha256-JxBnOTf5s4/CCZnEHlcB5lrl13uAyrmx/XzUwc7a378=";
stripRoot = false; stripRoot = false;
}; };

View file

@ -7,7 +7,7 @@
lib, lib,
writeShellScriptBin, writeShellScriptBin,
zlib, zlib,
writeScript, nix-update-script,
}: sdks: let }: sdks: let
inherit (builtins) concatStringsSep attrNames attrValues; inherit (builtins) concatStringsSep attrNames attrValues;
inherit (lib) optionals; inherit (lib) optionals;
@ -26,15 +26,15 @@
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "sourcemod"; pname = "sourcemod";
version = "1.12.0.7239"; version = "1.12.0.7260";
outputs = ["out" "dev"]; outputs = ["out" "dev"];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "alliedmodders"; owner = "alliedmodders";
repo = finalAttrs.pname; repo = "sourcemod";
rev = "b951843d42f7b9204615c14885468ea131a24002"; rev = finalAttrs.version;
sha256 = "sha256-aulM6fzXcmQf0xztWDRyxbH02mTGJKPMqpUMUSeNbaM="; sha256 = "sha256-FCaQeHOBWYD41JLRJHxH+qlcdrfZtLRLtv5/nAriVhQ=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
@ -72,26 +72,12 @@ in
ln -s $dev/public $dev/include ln -s $dev/public $dev/include
''; '';
passthru.updateScript = writeScript "update-sourcemod" '' passthru = {
#!/usr/bin/env nix-shell updateScript = nix-update-script {
#!nix-shell -i nu -p nurl common-updater-scripts extraArgs = [
"--flake"
let html = http get https://www.sourcemod.net/downloads.php?branch=stable "--use-github-releases"
let branch = $html | query web --query h3 | first | first | parse --regex "from (?P<branch>[0-9.]+) Branch" | get branch | first ];
let build = $html | query web --as-table [Build] | get 1 | get Build | first };
let newRev = $html | query web --query 'td a[href^="https://github.com/alliedmodders/sourcemod/tree/"]' --attribute ['href'] | first | get href | split words | last };
let oldHash = nix eval --raw .#sourcemod.src.hash
let oldRev = nix eval --raw .#sourcemod.src.rev
let oldVersion = nix eval --raw .#sourcemod.version
let newHash = nurl https://github.com/alliedmodders/sourcemod $newRev --submodules --hash
let newVersion = $"($branch).0.($build)"
let nix = open nix/sourcemod/sourcemod.nix |
str replace $oldHash $newHash |
str replace $oldVersion $newVersion |
str replace $oldRev $newRev
$nix | save -f nix/sourcemod/sourcemod.nix
'';
}) })

View file

@ -12,6 +12,7 @@
sourcemod-include-steamworks, sourcemod-include-steamworks,
sourcemod-include-json, sourcemod-include-json,
runCommand, runCommand,
sourcemod,
}: let }: let
inherit (builtins) concatStringsSep substring stringLength; inherit (builtins) concatStringsSep substring stringLength;
self = stdenv.mkDerivation rec { self = stdenv.mkDerivation rec {
@ -20,15 +21,10 @@
outputs = ["out" "dev"]; outputs = ["out" "dev"];
NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare -Wno-error=unused-but-set-variable -Wno-error=maybe-uninitialized -Wno-error=ignored-attributes -Wno-error=deprecated-declarations"; NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare -Wno-error=unused-but-set-variable -Wno-error=maybe-uninitialized -Wno-error=ignored-attributes -Wno-error=deprecated-declarations -Wno-error=unused-variable";
src = fetchFromGitHub { # always keep sourcemod and sourcepawn in sync
owner = "alliedmodders"; src = sourcemod.src + "/sourcepawn";
repo = pname;
rev = "eef61ffc069238a00c89b54b63813b6861b21c47";
hash = "sha256-Vuq3oJM3HvfA5VHTcOcvwLQQ2orHs+S+2OkMejUFChU=";
fetchSubmodules = true;
};
buildInputs = [ buildInputs = [
ambuild ambuild

View file

@ -2,16 +2,16 @@
{ {
"app_id": 232250, "app_id": 232250,
"depot_id": 232256, "depot_id": 232256,
"manifest": 698669566371320345, "manifest": 8265263630080743034,
"date": "2026-07-03T17:53:32", "date": "2026-10-16T17:05:15",
"hash": "sha256-PNG0Xz08ozVjqYN2XZHr1/4TmrITIZA0kLax3LGMqZY=" "hash": "sha256-wTuQGShqCWQ0Pc2KBbDPvu2sb8VMUF4dz6Z23+BMRXY="
}, },
{ {
"app_id": 232250, "app_id": 232250,
"depot_id": 232250, "depot_id": 232250,
"manifest": 2913732008368787064, "manifest": 5757605357257765879,
"date": "2026-07-08T20:53:13", "date": "2026-10-30T20:10:04",
"hash": "sha256-MW3TUtfNn7iOGfEcdIDCjWbd0HFYv4Tk2gUef3eyYCo=", "hash": "sha256-1sXc4P3JOZr4VBEjEMNMaTlyekc3afNGbs72IQKYsTI=",
"file_list": [ "file_list": [
"regex:^[^.]*(\\.(?!bsp$)[^.]+(.[^.]+)?)?$", "regex:^[^.]*(\\.(?!bsp$)[^.]+(.[^.]+)?)?$",
"tf/maps/cp_badlands.bsp" "tf/maps/cp_badlands.bsp"

View file

@ -1,32 +1,68 @@
#! /usr/bin/env nu #! /usr/bin/env nu
def main [] { def main [what: string = "all"] {
# update_all_depots match $what {
"all" => {
# nix-update --flake --use-update-script ambuild update_all_depots
# nix build .#ambuild update_sourcemod
update_sdks
# nix-update --flake --version=$"(get_metamod_version)" metamod-source update_addons
# nix build .#metamods.x86_64-linux.tf2 update_includes
update_plugins
# nix-update --flake --use-update-script sourcemod },
# nix build .#sourcemods.x86_64-linux.tf2 "depots" => update_all_depots,
"sourcemod" => update_sourcemod,
# let sdks = open nix/sourcemod/hl2sdks.json | columns "sdks" => update_sdks,
# $sdks | each {|sdk| update_sdk $sdk} "addons" => update_addons,
"includes" => update_includes,
# nix-update --flake --use-update-script sourcemod-include-curl "plugins" => update_plugins,
# nix-update --flake --use-update-script sourcemod-include-library }
# nix-update --flake --use-update-script sourcemod-include-steamworks
# nix-update --flake --use-update-script sourcemod-includes
list_plugins | each {|plugin| nix-update --flake --use-update-script $"sourcemod-plugin-($plugin)"}
# all F2 plugins are updated in one go
nix-update --flake --use-update-script sourcemod-plugin-afk
nix fmt nix fmt
} }
def update_sourcemod [] {
print "Updating sourcemod..."
nix-update --flake --use-update-script ambuild
nix build .#ambuild
nix-update --flake --use-update-script sourcemod metamod-source
nix build .#metamods.x86_64-linux.tf2
nix-update --flake --use-update-script sourcemod
nix build .#sourcepawn
nix build .#sourcemods.x86_64-linux.tf2
}
def update_plugins [] {
print "Updating plugins..."
list_plugins | each {|plugin|
NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-update --flake --use-update-script $"sourcemod-plugin-($plugin)"
nix build $".#sourcemod-plugin-($plugin)" --option system i686-linux
}
# all F2 plugins are updated in one go
nix-update --flake --use-update-script sourcemod-plugin-afk
}
def update_addons [] {
print "Updating addons..."
list_addons | each {|plugin| nix-update --flake --use-update-script $"sourcemod-addon-($plugin)"}
}
def update_includes [] {
print "Updating includes..."
nix-update --flake --use-update-script sourcemod-include-curl
nix-update --flake --use-update-script sourcemod-include-library
nix-update --flake --use-update-script sourcemod-include-steamworks
nix-update --flake --use-update-script sourcemod-includes
}
def update_sdks [] {
print "Updating sdks..."
let sdks = open nix/sourcemod/hl2sdks.json | columns
$sdks | each {|sdk| update_sdk $sdk}
}
def update_sdk [sdk: string] { def update_sdk [sdk: string] {
print $"Updating ($sdk) SDK" print $"Updating ($sdk) SDK"
# some sdks might have identical files at some point, so their hash can be the same # some sdks might have identical files at some point, so their hash can be the same
@ -38,13 +74,6 @@ def update_sdk [sdk: string] {
nix build .#sourcemods.x86_64-linux.tf2 nix build .#sourcemods.x86_64-linux.tf2
} }
def get_metamod_version [] {
let html = http get https://www.metamodsource.net/downloads.php/?branch=stable
let branch = $html | query web --query h3 | first | first | parse --regex "from (?P<branch>[0-9.]+) Branch" | get branch | first
let build = $html | query web --as-table [Build] | get Build | first
$"($branch).0.($build)"
}
def get_manifest [app: int, depot: int] { def get_manifest [app: int, depot: int] {
let info = DepotDownloader -app $app -depot $depot -manifest-only | parse -r 'Manifest (?P<manifest>[0-9]+) \((?P<date>[^)]+)\)' | first let info = DepotDownloader -app $app -depot $depot -manifest-only | parse -r 'Manifest (?P<manifest>[0-9]+) \((?P<date>[^)]+)\)' | first
# builting rm doesn't work for some reason? # builting rm doesn't work for some reason?
@ -61,6 +90,7 @@ def get_manifest [app: int, depot: int] {
} }
def update_all_depots [] { def update_all_depots [] {
print "Updating depots..."
let $depots = open nix/srcds/depots.json let $depots = open nix/srcds/depots.json
let updated = $depots | each {|manifest| update_manifest $manifest} let updated = $depots | each {|manifest| update_manifest $manifest}
@ -101,3 +131,7 @@ def extract_hash [] {
def list_plugins [] { def list_plugins [] {
ls -s nix/sourcemod/plugins/ | where type == file and ($it.name | str ends-with '.nix') and ($it.name != 'overlay.nix') | get name | str substring 0..-5 ls -s nix/sourcemod/plugins/ | where type == file and ($it.name | str ends-with '.nix') and ($it.name != 'overlay.nix') | get name | str substring 0..-5
} }
def list_addons [] {
ls -s nix/sourcemod/addons/ | where type == file and ($it.name | str ends-with '.nix') and ($it.name != 'overlay.nix') | get name | str substring 0..-5
}