rebar3: apply tmpdir patch from upstream

This commit is contained in:
David 2021-07-26 09:19:51 +02:00 committed by Raphael Megzari
parent f8c7dd7df7
commit c160267002

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub,
{ lib, stdenv, fetchFromGitHub, fetchpatch,
fetchHex, erlang, makeWrapper,
writeScript, common-updater-scripts, coreutils, git, gnused, nix, rebar3-nix }:
@ -40,12 +40,14 @@ let
'';
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 ];
patches = [
# TODO: remove this on next rebar3 release
(fetchpatch {
name = "escriptize-erl-libs";
url = "https://github.com/erlang/rebar3/commit/11055384dbd5bf7d181bca83a33b0e100275ff21.patch";
sha256 = "01xjaqnhmjlxqdgb8ph15wssjq5crdhjslxnndbs5f0kscqpq14c";
})
];
checkPhase = ''
HOME=. escript ./rebar3 ct