build-mix buildRebar3: strip out derivation for NIFs

This commit is contained in:
happysalada 2021-06-06 19:56:33 +09:00 committed by Raphael Megzari
parent 8989d2eae8
commit 2a87cb7a8b
2 changed files with 9 additions and 4 deletions

View File

@ -29,9 +29,6 @@ let
MIX_DEBUG = if enableDebugInfo then 1 else 0;
HEX_OFFLINE = 1;
# stripping does not have any effect on beam files
dontStrip = true;
# add to ERL_LIBS so other modules can find at runtime.
# http://erlang.org/doc/man/code.html#code-path
# Mix also searches the code path when compiling with the --no-deps-check flag
@ -72,6 +69,10 @@ let
runHook postInstall
'';
# stripping does not have any effect on beam files
# it is however needed for dependencies with NIFs like bcrypt for example
dontStrip = false;
passthru = {
packageName = name;
env = shell self;

View File

@ -42,9 +42,13 @@ let
buildInputs = buildInputs ++ [ erlang rebar3 openssl libyaml ];
propagatedBuildInputs = unique beamDeps;
dontStrip = true;
inherit src;
# stripping does not have any effect on beam files
# it is however needed for dependencies with NIFs
# false is the default but we keep this for readability
dontStrip = false;
setupHook = writeText "setupHook.sh" ''
addToSearchPath ERL_LIBS "$1/lib/erlang/lib/"
'';