forked from mirrors/nixpkgs
rebar3Relx: add executable to bin dir and remove unnecessary dependency
This commit is contained in:
parent
8b0cb6f095
commit
8588b80af4
1 changed files with 11 additions and 0 deletions
|
@ -82,9 +82,20 @@ let
|
|||
else "rel"}
|
||||
mkdir -p "$out/$dir"
|
||||
cp -R --preserve=mode "_build/${profile}/$dir" "$out"
|
||||
${lib.optionalString (releaseType == "release")
|
||||
"mkdir -p $out/bin && ln -s -t $out/bin $out/rel/*/bin/*"}
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
for dir in $out/rel/*/erts-*; do
|
||||
echo "ERTS found in $dir - removing references to erlang to reduce closure size"
|
||||
for f in $dir/bin/{erl,start}; do
|
||||
substituteInPlace "$f" --replace "${erlang}/lib/erlang" "''${dir/\/erts-*/}"
|
||||
done
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
inherit (erlang.meta) platforms;
|
||||
} // meta;
|
||||
|
|
Loading…
Add table
Reference in a new issue