diff --git a/pkgs/development/tools/build-managers/rebar3/default.nix b/pkgs/development/tools/build-managers/rebar3/default.nix index 9be3d232fb89..3b775eeaef1c 100644 --- a/pkgs/development/tools/build-managers/rebar3/default.nix +++ b/pkgs/development/tools/build-managers/rebar3/default.nix @@ -39,6 +39,14 @@ let HOME=. escript bootstrap ''; + + patches = [] + # Skips test that can write outside the designated tmp directory, potentially resulting in build failures + # due to file ownership issues if ran without sandbox (eg. Mac M1 default). This patch can be Removed when + # rebar3 releases with the following commit: + # https://github.com/erlang/rebar3/commit/11055384dbd5bf7d181bca83a33b0e100275ff21 + ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ ./tmp-tests-skip.patch ]; + checkPhase = '' HOME=. escript ./rebar3 ct ''; diff --git a/pkgs/development/tools/build-managers/rebar3/tmp-tests-skip.patch b/pkgs/development/tools/build-managers/rebar3/tmp-tests-skip.patch new file mode 100644 index 000000000000..b90e0f9d2bb6 --- /dev/null +++ b/pkgs/development/tools/build-managers/rebar3/tmp-tests-skip.patch @@ -0,0 +1,17 @@ +diff --git a/test/rebar_file_utils_SUITE.erl b/test/rebar_file_utils_SUITE.erl +index d771a82..05cfbf7 100644 +--- a/test/rebar_file_utils_SUITE.erl ++++ b/test/rebar_file_utils_SUITE.erl +@@ -34,13 +34,11 @@ + + all() -> + [{group, tmpdir}, +- {group, reset_dir}, + {group, mv}, + path_from_ancestor, + canonical_path, + absolute_path, + normalized_path, +- resolve_link, + split_dirname, + mv_warning_is_ignored].