mix-release: add comments

master
happysalada 2021-06-07 09:22:07 +09:00 committed by Raphael Megzari
parent e13301fd5c
commit 2e3e591211
1 changed files with 5 additions and 0 deletions

View File

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