@@ -82,6 +82,9 @@ stdenv.mkDerivation (overridable // {
8282 runHook postInstall
8383 '';
8484
85+ # Stripping of the binary is intentional
86+ # even though it does not affect beam files
87+ # it is necessary for NIFs binaries
8588 postFixup = ''
8689 if [ -e "$out/bin/${pname}.bat" ]; then # absent in special cases, i.e. elixir-ls
8790 rm "$out/bin/${pname}.bat" # windows file
@@ -97,6 +100,8 @@ stdenv.mkDerivation (overridable // {
97100 # closure size
98101 if [ -e $out/erts-* ]; then
99102 echo "ERTS found in $out - removing references to erlang to reduce closure size"
103+ # there is a link in $out/erts-*/bin/start always
104+ # sometimes there are links in dependencies like bcrypt compiled binaries
100105 for file in $(rg "${erlang}/lib/erlang" "$out" --text --files-with-matches); do
101106 substituteInPlace "$file" --replace "${erlang}/lib/erlang" "$out"
102107 done