summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-11-09 12:00:24 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-16 03:12:34 -0500
commit85f2c0ba760377e68673d9efb336ac762e04683c (patch)
tree01cdec5dd8edade1b94b1d92cbd211aa0a1079bf
parent1f0014a852e9b0a1553bc7a29b5844b4a81d950f (diff)
downloadhaskell-85f2c0ba760377e68673d9efb336ac762e04683c.tar.gz
gitlab-ci/darwin: Move SDK path discovery into toolchain.nix
Reduce a bit of duplication and a manual step when running builds manually.
-rw-r--r--.gitlab-ci.yml9
-rw-r--r--.gitlab/darwin/toolchain.nix3
2 files changed, 3 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 497cb02e21..c3d7bcaa1e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -574,9 +574,6 @@ validate-x86_64-darwin:
- cat ci-timings
script: |
- sdk_path="$(xcrun --sdk macosx --show-sdk-path)"
- CONFIGURE_ARGS="$CONFIGURE_ARGS --with-ffi-libraries=$sdk_path/usr/lib --with-ffi-includes=$sdk_path/usr/include/ffi"
-
# fix up config.sub in libraries for the time.
# aarch64-darwin is not supported in older config.sub's
find libraries -name config.sub -exec cp config.sub {} \;
@@ -623,13 +620,7 @@ validate-aarch64-darwin:
- .gitlab/ci.sh clean
- cat ci-timings
- # I wish we could just use the nix #! logic, but we can't --run and -i bash
- # behave very differently. -i bash does not pass any nix related env vars
- # the whole $stdenv/setup part seems to be missing.
script: |
- sdk_path="$(xcrun --sdk macosx --show-sdk-path)"
- CONFIGURE_ARGS="$CONFIGURE_ARGS --with-ffi-libraries=$sdk_path/usr/lib --with-ffi-includes=$sdk_path/usr/include/ffi"
-
# fix up config.sub in libraries for the time.
# aarch64-darwin is not supported in older config.sub's
find libraries -name config.sub -exec cp config.sub {} \;
diff --git a/.gitlab/darwin/toolchain.nix b/.gitlab/darwin/toolchain.nix
index 1042b76c18..fe221b3c43 100644
--- a/.gitlab/darwin/toolchain.nix
+++ b/.gitlab/darwin/toolchain.nix
@@ -98,5 +98,8 @@ pkgs.writeTextFile {
export SPHINXBUILD="${pkgs.python3Packages.sphinx}/bin/sphinx-build"
export CABAL_INSTALL="${pkgs.cabal-install}/bin/cabal"
export CABAL="$CABAL_INSTALL"
+
+ sdk_path="$(xcrun --sdk macosx --show-sdk-path)"
+ export CONFIGURE_ARGS="$CONFIGURE_ARGS --with-ffi-libraries=$sdk_path/usr/lib --with-ffi-includes=$sdk_path/usr/include/ffi"
'';
}