mix-release: remove erlang ref in erts dir
parent
357cc8e05d
commit
8989d2eae8
|
@ -93,21 +93,21 @@ stdenv.mkDerivation (overridable // {
|
||||||
if [ -e $out/releases/COOKIE ]; then # absent in special cases, i.e. elixir-ls
|
if [ -e $out/releases/COOKIE ]; then # absent in special cases, i.e. elixir-ls
|
||||||
rm $out/releases/COOKIE
|
rm $out/releases/COOKIE
|
||||||
fi
|
fi
|
||||||
# TODO remove the uneeded reference too erlang
|
# removing unused erlang reference from resulting derivation to reduce
|
||||||
# one possible way would be
|
# closure size
|
||||||
# for f in $(${findutils}/bin/find $out -name start); do
|
if [ -e $out/erts-* ]; then
|
||||||
# substituteInPlace $f \
|
echo "ERTS found in $dir - removing references to erlang to reduce closure size"
|
||||||
# --replace 'ROOTDIR=${erlang}/lib/erlang' 'ROOTDIR=""'
|
for file in $out/erts-*/bin/{erl,start}; do
|
||||||
# done
|
substituteInPlace "$file" --replace "${erlang}/lib/erlang" "$out"
|
||||||
# What is left to do is to check that erlang is not required on
|
done
|
||||||
# the host
|
fi
|
||||||
|
|
||||||
patchShebangs $out
|
patchShebangs $out
|
||||||
runHook postFixup
|
runHook postFixup
|
||||||
'';
|
'';
|
||||||
# TODO figure out how to do a Fixed Output Derivation and add the output hash
|
|
||||||
# This doesn't play well at the moment with Phoenix projects
|
|
||||||
# for example that have frontend dependencies
|
|
||||||
|
|
||||||
|
# TODO investigate why the resulting closure still has
|
||||||
|
# a reference to erlang.
|
||||||
|
# uncommenting the following will fail the build
|
||||||
# disallowedReferences = [ erlang ];
|
# disallowedReferences = [ erlang ];
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue