{ applyPatches, fetchgit, fetchYarnDeps, lib, stdenv, nodejs, yarn, yarn2nix-moretea, ... }: stdenv.mkDerivation rec { pname = "masto-fe-standalone"; version = "0.0.0-${builtins.substring 0 6 rev}"; rev = "3481816b99ec9fb44e08cf0a5499ee3e2b78cc1c"; src = applyPatches { src = fetchgit { url = "https://codeberg.org/superseriousbusiness/masto-fe-standalone"; inherit rev; sha256 = "sha256-cfuaDFNfgmMoCJUMyermavqutxuTNRrpIdnlLQyXI7I="; }; patches = [ ./0001-set-a-default-instance.patch ./0002-update-default-state.patch ]; }; yarnOfflineCache = fetchYarnDeps { yarnLock = "${src}/yarn.lock"; hash = "sha256-OkjdQsq6DBZRVyoESCGR6xNnYnSO06E+ydbaBGtKG8w="; }; 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 ''; }