{ applyPatches, fetchgit, fetchYarnDeps, lib, stdenv, nodejs, yarn, yarn2nix-moretea, ... }: stdenv.mkDerivation rec { pname = "mastoFE-standalone"; version = "0.0.0-${builtins.substring 0 6 rev}"; rev = "3962700726f58d946d5a6eed9e9bea63b8c2eb04"; src = applyPatches { src = fetchgit { url = "https://iceshrimp.dev/iceshrimp/masto-fe-standalone"; inherit rev; sha256 = "sha256-ed6qb5IiqHQEtGHbexqivf+x4aF1JYBZKPKtG5Ao6Gg"; }; patches = [ ./0001-public-auth.js-hardcode-instance-url.patch ]; }; yarnOfflineCache = fetchYarnDeps { yarnLock = "${src}/yarn.lock"; hash = "sha256-ddEx2aBshkq83zcycOHUqg/CteCJTiE0jb3LCZdj5Z8="; }; nativeBuildInputs = [ nodejs yarn yarn2nix-moretea.fixup_yarn_lock ]; configurePhase = '' export HOME=$(mktemp -d) ''; buildPhase = '' export NODE_OPTIONS=--openssl-legacy-provider yarn config --offline set yarn-offline-mirror ${yarnOfflineCache} fixup_yarn_lock yarn.lock yarn install --offline \ --frozen-lockfile \ --ignore-engines --ignore-scripts patchShebangs . yarn build:production ''; installPhase = '' cp -R ./public $out ''; }