mirror of
https://codeberg.org/spire/nix.git
synced 2026-11-30 11:30:45 +01:00
sourcemod-addon-steamworks from source
This commit is contained in:
parent
06fef7782e
commit
b9ca632c6d
4 changed files with 46 additions and 27 deletions
|
|
@ -1,7 +1,7 @@
|
|||
final: prev: {
|
||||
mkSpirePlugin = final.callPackage ./builder/spire-plugin.nix {};
|
||||
sourcemod-addon-curl = final.callPackage ./curl.nix {};
|
||||
sourcemod-plugin-steamworks = final.callPackage ./steamworks.nix {};
|
||||
sourcemod-addon-steamworks = final.callPackage ./steamworks.nix {};
|
||||
sourcemod-plugin-soap-tf2dm = final.callPackage ./soap-tf2dm.nix {};
|
||||
sourcemod-plugin-progressive-ruleset-timer = final.callPackage ./progressive-ruleset-timer.nix {};
|
||||
sourcemod-plugin-socket = final.callPackage ./socket.nix {};
|
||||
|
|
|
|||
|
|
@ -1,31 +1,49 @@
|
|||
{
|
||||
fetchurl,
|
||||
stdenvNoCC,
|
||||
nix-update-script,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "sourcemod-plugin-steamworks";
|
||||
version = "1.2.3c";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/KyleSanderson/SteamWorks/releases/download/${finalAttrs.version}/package-lin.tgz";
|
||||
sha256 = "sha256-Znnm39GdTHinHSJP8/fXLZvsvCVggu1LzoXLqh4BJxM=";
|
||||
fetchFromGitHub,
|
||||
stdenv,
|
||||
writeScript,
|
||||
ambuild,
|
||||
hl2sdk,
|
||||
sourcemod,
|
||||
metamod-source,
|
||||
}: let
|
||||
steamworks-sdk = fetchFromGitHub {
|
||||
owner = "rlabrecque";
|
||||
repo = "SteamworksSDK";
|
||||
rev = "be6107f4b75bf996531415c53a6488a33a2a1be3";
|
||||
hash = "sha256-7+s2BKyNMCyiMRoj46DWDWGWZM+melUfuoMzvKDuYUo=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir $out
|
||||
mv addons $out/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--flake"
|
||||
"--version=1.2.3c" # https://github.com/Mic92/nix-update/issues/435
|
||||
];
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "sourcemod-addon-steamworks";
|
||||
version = "1.2.3c-64bit-compat";
|
||||
src = fetchFromGitHub {
|
||||
owner = "moonexpr";
|
||||
repo = "SteamWorks";
|
||||
tag = "x86_64-support";
|
||||
hash = "sha256-SvyXsVL+JuJmxO0ox5fyAlmt9Ir52U/uCJ8HbUNA5Oc=";
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
nativeBuildInputs = [ambuild];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=format-security";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cp ../AMBuildScript ../../
|
||||
python ../configure.py -s tf2 --hl2sdk-root ${hl2sdk.tf2} --sm-path ${sourcemod.src} --mms-path ${metamod-source.src} --steamworks-path ${steamworks-sdk}
|
||||
ambuild
|
||||
|
||||
cp -r package $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
# https://github.com/KyleSanderson/SteamWorks/pull/39 needs to be merged before we can auto-update
|
||||
updateScript = writeScript "update-null" "";
|
||||
};
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue