package srctvplus

This commit is contained in:
Robin Appelman 2026-07-10 18:36:44 +02:00
commit a5e2b0ec6f
3 changed files with 54 additions and 0 deletions

View file

@ -55,6 +55,7 @@
"sourcemod-include-library"
"sourcemod-include-steamworks"
"srcds-tf2"
"srctvplus"
"sourcemod-addon-curl"
"sourcemod-addon-steamworks"
"sourcemod-addon-socket"
@ -81,6 +82,7 @@
sourcemod = true;
plugins = with pkgs; [
sourcemod-plugin-soap-tf2dm
srctvplus
];
};
testScript = pkgs:

View file

@ -17,6 +17,7 @@ in {
gamedir = "tf";
sdk = "tf2";
};
srctvplus = final.callPackage ./srctvplus.nix {};
steam-depots = listToAttrs (map (depot: {
name = "steam-depot-${toString depot.app_id}-${toString depot.depot_id}";
value = final.callPackage ./depot.nix {

51
nix/srcds/srctvplus.nix Normal file
View file

@ -0,0 +1,51 @@
{
fetchFromGitHub,
stdenv,
nix-update-script,
prelink,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "srctvplus";
version = "3.0";
src = fetchFromGitHub {
owner = "dalegaard";
repo = "srctvplus";
rev = "v${finalAttrs.version}";
hash = "sha256-vywrMllBxWf0TUShHJvfRCb4NXXrmiumG8AxNWooSMA=";
fetchSubmodules = true;
};
nativeBuildInputs = [
prelink
];
NIX_CFLAGS_COMPILE = "-ftrampoline-impl=heap";
buildPhase = ''
runHook preBuild
bash build.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/addons
execstack -c srctvplus.so
cp srctvplus.vdf srctvplus.so $out/addons
runHook postInstall
'';
passthru = {
updateScript = nix-update-script {
extraArgs = [
"--flake"
];
};
};
meta.platforms = ["i686-linux"];
})