{ sourcemod, metamod-source , symlinkJoin }: { configs ? [] , postBuild ? "" , plugins ? [] , enabledPlugins ? [] , name ? "sourcemodWithPlugins" }@args: symlinkJoin (args // { paths = configs ++ [ metamod-source sourcemod ] ++ plugins; inherit name; postBuild = '' if [ -n "''${enabledPlugins:-}" ]; then pushd $out/share/addons/sourcemod/plugins mkdir -p disabled for plug in $enabledPlugins; do fp=disabled/"$plug.smx" [ -e "$fp" ] || { echo "No such plugin $fp" >&2 exit 1 } ln -s "$fp" ./ done popd fi ${postBuild} ''; })