From e5250bb059c9d9851a96bb8b299d3705f6597ba8 Mon Sep 17 00:00:00 2001 From: c4710n Date: Fri, 1 Dec 2023 10:33:46 +0800 Subject: [PATCH] elixir: enable Erlang compiler option - deterministic --- pkgs/development/interpreters/elixir/generic-builder.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/elixir/generic-builder.nix b/pkgs/development/interpreters/elixir/generic-builder.nix index 9007ab12d7547..348d054a6c773 100644 --- a/pkgs/development/interpreters/elixir/generic-builder.nix +++ b/pkgs/development/interpreters/elixir/generic-builder.nix @@ -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