git.iko.soy/typeable/nixpkgs
on master help sign in
mix-release: add comments
commit2e3e591211c1afe4d1b2abc93d537c93f250ce1a authorhappysalada <raphael@megzari.com> dateMon 7 Jun 2021, 09:22 (5 years ago) parente13301f
1 file changed+5
pkgs/development/beam-modules/mix-release.nix+5
pkgs/development/beam-modules/mix-release.nix+5
@@ -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