Commit 1b9dbf40 authored by happysalada's avatar happysalada Committed by Raphael Megzari
Browse files

beam: mix-release: do not use substituteInPlace on binaries

parent 5ea38738
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -104,8 +104,12 @@ stdenv.mkDerivation (overridable // {
    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
      # TODO:
      # sometimes there are links in dependencies like bcrypt compiled binaries
      for file in $(rg "${erlang}/lib/erlang" "$out" --text --files-with-matches); do
      # at the moment those are not removed since substituteInPlace will
      # error on binaries
      for file in $(rg "${erlang}/lib/erlang" "$out" --files-with-matches); do
        echo "removing reference to erlang in $file"
        substituteInPlace "$file" --replace "${erlang}/lib/erlang" "$out"
      done
    fi