{ 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 < . 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 ''; }