From 1e41de83285ddc2e527d46e2fbad54f990465e8a Mon Sep 17 00:00:00 2001
From: Bryan Richter <bryan@haskell.foundation>
Date: Fri, 26 Apr 2024 12:56:19 +0300
Subject: [PATCH] CI: Work around frequent Signal 9 errors

---
 .gitlab-ci.yml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7ad27720b054..d9d0f123cc61 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -297,6 +297,12 @@ lint-ci-config:
     GIT_SUBMODULE_STRATEGY: none
   before_script:
     - echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
+    # Note [Nix-in-Docker]
+    # ~~~~~~~~~~~~~~~~~~~~
+    # FIXME: This is a workaround for a Nix-in-Docker issue. See
+    # https://gitlab.haskell.org/ghc/head.hackage/-/issues/38#note_560487 for
+    # discussion.
+    - nix-shell -p gnused --run "sed -i -e 's/nixbld//' /etc/nix/nix.conf"
   script:
     - nix run .gitlab/generate-ci#generate-jobs
     # 1 if .gitlab/generate_jobs changed the output of the generated config
@@ -1106,6 +1112,8 @@ project-version:
     GIT_SUBMODULE_STRATEGY: "none"
   before_script:
     - echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
+    # FIXME: See Note [Nix-in-Docker]
+    - nix-shell -p gnused --run "sed -i -e 's/nixbld//' /etc/nix/nix.conf"
     - nix-channel --update
     - cat version.sh
     # Calculate the project version
-- 
GitLab