From b06a90b96506a97fb01b4606bcbd94039e9a2e6d Mon Sep 17 00:00:00 2001
From: Julian Ospald <hasufell@posteo.de>
Date: Tue, 24 Mar 2020 21:18:56 +0100
Subject: [PATCH] Notarization on mac

---
 ghcup | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/ghcup b/ghcup
index 16b87c8..698a062 100755
--- a/ghcup
+++ b/ghcup
@@ -1456,6 +1456,11 @@ install_ghc() {
 
         edo cd "./ghc-${myghcver}"
 
+        # https://gitlab.haskell.org/ghc/ghc/issues/17418
+        if [ "$(get_distro_alias "$(get_distro_name)")" = "darwin" ] ; then
+            edo xattr -cr .
+        fi
+
         debug_message "Installing GHC into ${inst_location}"
 
         edo ./configure --prefix="${inst_location}"
@@ -1732,6 +1737,11 @@ install_cabal() {
             unpack "${download_tarball_name}"
         fi
 
+        # https://gitlab.haskell.org/ghc/ghc/issues/17418
+        if [ "$(get_distro_alias "$(get_distro_name)")" = "darwin" ] ; then
+            edo xattr -cr .
+        fi
+
         edo mv -f cabal "${inst_location}"/cabal
         if [ -f "${tmp_dir}/${download_tarball_name}" ] ; then
             rm "${tmp_dir}/${download_tarball_name}"
@@ -1796,6 +1806,11 @@ compile_ghc() {
 
         edo cd "./ghc-${myghcver}"
 
+        # https://gitlab.haskell.org/ghc/ghc/issues/17418
+        if [ "$(get_distro_alias "$(get_distro_name)")" = "darwin" ] ; then
+            edo xattr -cr .
+        fi
+
         if [ -n "${build_config}" ] ; then
             edo cat "${build_config}" > mk/build.mk
         else
-- 
GitLab