{ lib, fetchFromGitHub, gerbil-support, gerbilPackages, gerbil, ... }: rec { pname = "glow-lang"; version = "unstable-2023-04-26"; git-version = "0.3.2-222-gb19cd980"; softwareName = "Glow"; gerbil-package = "mukn/glow"; version-path = "version"; gerbilInputs = with gerbilPackages; [ gerbil-utils gerbil-crypto gerbil-poo gerbil-persist gerbil-ethereum gerbil-libp2p smug-gerbil ftw ]; pre-src = { fun = fetchFromGitHub; owner = "Glow-Lang"; repo = "glow"; rev = "b19cd98082dfc5156d1b4fc83cde161572d6a211"; sha256 = "0k3qy5826pxqr9ylnnpq4iikxf4j50987vhpa5qiv99j0p643xr3"; }; postPatch = '' substituteInPlace "runtime/glow-path.ss" --replace \ '(def glow-install-path (source-path "dapps"))' \ '(def glow-install-path "$out")' ''; postInstall = '' mkdir -p $out/bin $out/gerbil/lib/mukn/glow $out/share/glow/dapps cp main.ss $out/gerbil/lib/mukn/glow/ cp dapps/{buy_sig,coin_flip,rps_simple}.glow $out/share/glow/dapps/ cat > $out/bin/glow <