From 1293f272098cf0ccbe733771fd62e66ab6b140bb Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 3 Dec 2024 12:43:21 +1300 Subject: [PATCH] Fix for ghc >9.10 --- overlays/bootstrap.nix | 1 + overlays/patches/ghc/ghc-9.10-hadrian-android.patch | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 overlays/patches/ghc/ghc-9.10-hadrian-android.patch diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index e12d33c12..f7e2af24f 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -227,6 +227,7 @@ in { ++ onAndroid (onAarch32 (until "9.2" ./patches/ghc/ghc-8.10.7-bionic-libc.patch)) ++ onAndroid (onAarch32 (until "9.2" ./patches/ghc/ghc-8.10.7-cross-dont-build-stage2-tools.patch)) ++ onAndroid (fromUntil "9.0" "9.10" ./patches/ghc/ghc-9.6-hadrian-android.patch) + ++ onAndroid (from "9.10" ./patches/ghc/ghc-9.10-hadrian-android.patch) ++ onMusl (onAarch64 (fromUntil "9.4" "9.8" ./patches/ghc/ghc-9.6-hadrian-strip-cmd.patch)) ++ onMusl (onAarch64 (fromUntil "9.8" "9.10" ./patches/ghc/ghc-9.8-hadrian-strip-cmd.patch)) ++ onMusl (onAarch64 (fromUntil "9.10" "9.12" ./patches/ghc/ghc-9.10-hadrian-strip-cmd.patch)) diff --git a/overlays/patches/ghc/ghc-9.10-hadrian-android.patch b/overlays/patches/ghc/ghc-9.10-hadrian-android.patch new file mode 100644 index 000000000..4200269d9 --- /dev/null +++ b/overlays/patches/ghc/ghc-9.10-hadrian-android.patch @@ -0,0 +1,10 @@ +diff --git a/hadrian/src/Hadrian/Haskell/Cabal.hs b/hadrian/src/Hadrian/Haskell/Cabal.hs +index 17249efd79..ff6cc57949 100644 +--- a/hadrian/src/Hadrian/Haskell/Cabal.hs ++++ b/hadrian/src/Hadrian/Haskell/Cabal.hs +@@ -84,5 +84,6 @@ cabalOsString "mingw32" = "windows" + cabalOsString "darwin" = "osx" + cabalOsString "solaris2" = "solaris" + cabalOsString "gnu" = "hurd" ++cabalOsString "linux_android" = "android" + cabalOsString other = other