{ fetchgit, fetchPnpmDeps, lib, makeWrapper, nodejs, pnpm_11, pnpmConfigHook, stdenvNoCC, }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "city-role-bot"; version = "0-unstable-2026-09-04"; src = fetchgit { url = "https://git.t4t.associates/char-slop/city-role-bot.git"; rev = "d72003f19e53e6406522d8573015aa5fee1c16de"; hash = "sha256-yzisagfzT1ekSKgGoOWnipykJSEzn3ofTNmGIM14xVk="; }; postPatch = '' substituteInPlace src/store.ts \ --replace-fail "new URL('../data/', import.meta.url)" \ "new URL(process.env.CITY_ROLE_BOT_DATA_DIR ?? '../data/', import.meta.url)" ''; pnpmDeps = fetchPnpmDeps { inherit (finalAttrs) pname version src postPatch; pnpm = pnpm_11; fetcherVersion = 4; hash = "sha256-pwVrivKuMB/S+0Ir0j9f4iLFKVO6sXRsxPzklSDODdo="; }; nativeBuildInputs = [ makeWrapper nodejs pnpm_11 pnpmConfigHook ]; dontBuild = true; doCheck = true; checkPhase = '' runHook preCheck pnpm run check runHook postCheck ''; installPhase = '' runHook preInstall mkdir -p $out/lib/city-role-bot cp -r node_modules src $out/lib/city-role-bot/ makeWrapper ${lib.getExe nodejs} $out/bin/city-role-bot \ --add-flags "$out/lib/city-role-bot/src/index.ts" runHook postInstall ''; meta = { description = "Reaction-role Discord bot"; homepage = "https://git.t4t.associates/char-slop/city-role-bot"; mainProgram = "city-role-bot"; }; })