elixir: enable Erlang compiler option - deterministic

This commit is contained in:
c4710n 2023-12-01 10:33:46 +08:00 committed by Yt
parent c3ac6b916c
commit 1b45f71c2e

View File

@ -20,7 +20,7 @@
} @ args:
let
inherit (lib) getVersion versionAtLeast optional;
inherit (lib) getVersion versionAtLeast optional concatStringsSep;
in
assert versionAtLeast (getVersion erlang) minimumOTPVersion;
@ -36,7 +36,12 @@ stdenv.mkDerivation ({
LANG = "C.UTF-8";
LC_TYPE = "C.UTF-8";
buildFlags = optional debugInfo "ERL_COMPILER_OPTIONS=debug_info";
ERLC_OPTS =
let
erlc_opts = [ "deterministic" ]
++ optional debugInfo "debug_info";
in
"[${concatStringsSep "," erlc_opts}]";
preBuild = ''
patchShebangs ${escriptPath} || true