···9393 if [ -e $out/releases/COOKIE ]; then # absent in special cases, i.e. elixir-ls9494 rm $out/releases/COOKIE9595 fi9696- # TODO remove the uneeded reference too erlang9797- # one possible way would be9898- # for f in $(${findutils}/bin/find $out -name start); do9999- # substituteInPlace $f \100100- # --replace 'ROOTDIR=${erlang}/lib/erlang' 'ROOTDIR=""'101101- # done102102- # What is left to do is to check that erlang is not required on103103- # the host9696+ # removing unused erlang reference from resulting derivation to reduce9797+ # closure size9898+ if [ -e $out/erts-* ]; then9999+ echo "ERTS found in $dir - removing references to erlang to reduce closure size"100100+ for file in $out/erts-*/bin/{erl,start}; do101101+ substituteInPlace "$file" --replace "${erlang}/lib/erlang" "$out"102102+ done103103+ fi104104105105 patchShebangs $out106106 runHook postFixup107107 '';108108- # TODO figure out how to do a Fixed Output Derivation and add the output hash109109- # This doesn't play well at the moment with Phoenix projects110110- # for example that have frontend dependencies111108109109+ # TODO investigate why the resulting closure still has110110+ # a reference to erlang.111111+ # uncommenting the following will fail the build112112 # disallowedReferences = [ erlang ];113113})