From e3beb7cbd9cd66345a0797bc45c8870836d58322 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 30 Nov 2021 01:46:53 +0100 Subject: [PATCH] haskell.compiler.*: mark as unsupported on aarch64-darwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While GHC now can be bootstrapped and built on aarch64-darwin, it seems to work only to an extent. All sorts of strange issues have manifested themselves in `haskellPackages` and downstream usage which leads me to conclude that it would be misleading to call it supported on this platform, especially in a stable channel. To give a few examples, separate bin outputs just don't work in general [1] and `opt` fails for unknown reasons in some derivations [2]. As I don't own any appropriate hardware, I have tried tackling these issues by staring into my crystal ball, but so far to no avail (even worse, new issues [3] have cropped up due to changes that should have been an improvement). Given these circumstances, I'm not willing to call GHC supported on aarch64-darwin for the stable channel. I'm (for now) hopeful that we can improve the situation on `master` going forward, but it is not guaranteed that these changes will be backportable without a ton of effort. Should it turn out that we can't resolve these issues or maintain GHC's aarch64-darwin support due to a lack of contributors going forward, I am also prepared to drop aarch64-darwin support completely. While it has been proclaimed a Tier 3 platform, I would argue that the “popular” package GHC has never been working, at least not properly. [1]: https://github.com/NixOS/nixpkgs/issues/140774 https://github.com/NixOS/nixpkgs/issues/140180 [2]: https://matrix.to/#/!RbXGJhHMsnQcNIDFWN:nixos.org/$C6FK74EajqSTk58JzriYpQJ9f6x3UH3tIREcn04Y-rM?via=nixos.org&via=matrix.org&via=tchncs.de [3]: https://github.com/srid/haskell-template/issues/1#issuecomment-982134929 --- pkgs/development/compilers/ghc/8.10.7-binary.nix | 5 +++++ pkgs/development/compilers/ghc/8.10.7.nix | 5 +++++ pkgs/development/compilers/ghc/9.0.1.nix | 5 +++++ pkgs/development/compilers/ghc/9.2.1.nix | 5 +++++ pkgs/development/compilers/ghc/head.nix | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/pkgs/development/compilers/ghc/8.10.7-binary.nix b/pkgs/development/compilers/ghc/8.10.7-binary.nix index 58be16dc5693d..ad51e296230cb 100644 --- a/pkgs/development/compilers/ghc/8.10.7-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.7-binary.nix @@ -397,6 +397,11 @@ stdenv.mkDerivation rec { # `pkgsMusl`. platforms = builtins.attrNames ghcBinDists.${distSetName}; hydraPlatforms = builtins.filter (p: minimal || p != "aarch64-linux") platforms; + # While GHC >= 8.10.7 builds and works to an extent on aarch64-darwin, + # there are multiple unresolved issues degrading the quality of the + # `haskellPackages` set. As such, we can't call it a supported platform. + # Use `config.allowUnsupportedSystem` if you are feeling adventurous. + badPlatforms = [ "aarch64-darwin" ]; maintainers = with lib.maintainers; [ prusnak domenkozar diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index 7e59bd974a251..7bccebcc741db 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -347,6 +347,11 @@ stdenv.mkDerivation (rec { ] ++ lib.teams.haskell.members; timeout = 24 * 3600; inherit (ghc.meta) license platforms; + # While GHC >= 8.10.7 builds and works to an extent on aarch64-darwin, + # there are multiple unresolved issues degrading the quality of the + # `haskellPackages` set. As such, we can't call it a supported platform. + # Use `config.allowUnsupportedSystem` if you are feeling adventurous. + badPlatforms = [ "aarch64-darwin" ]; }; } // lib.optionalAttrs targetPlatform.useAndroidPrebuilt { diff --git a/pkgs/development/compilers/ghc/9.0.1.nix b/pkgs/development/compilers/ghc/9.0.1.nix index c0f42680bb87c..665dd958cd0b2 100644 --- a/pkgs/development/compilers/ghc/9.0.1.nix +++ b/pkgs/development/compilers/ghc/9.0.1.nix @@ -312,6 +312,11 @@ stdenv.mkDerivation (rec { ] ++ lib.teams.haskell.members; timeout = 24 * 3600; inherit (ghc.meta) license platforms; + # While GHC >= 8.10.7 builds and works to an extent on aarch64-darwin, + # there are multiple unresolved issues degrading the quality of the + # `haskellPackages` set. As such, we can't call it a supported platform. + # Use `config.allowUnsupportedSystem` if you are feeling adventurous. + badPlatforms = [ "aarch64-darwin" ]; }; } // lib.optionalAttrs targetPlatform.useAndroidPrebuilt { diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index e43dea9cffb73..08240d9eb6cc7 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -315,6 +315,11 @@ stdenv.mkDerivation (rec { ] ++ lib.teams.haskell.members; timeout = 24 * 3600; inherit (ghc.meta) license platforms; + # While GHC >= 8.10.7 builds and works to an extent on aarch64-darwin, + # there are multiple unresolved issues degrading the quality of the + # `haskellPackages` set. As such, we can't call it a supported platform. + # Use `config.allowUnsupportedSystem` if you are feeling adventurous. + badPlatforms = [ "aarch64-darwin" ]; }; } // lib.optionalAttrs targetPlatform.useAndroidPrebuilt { diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index cb56087fe1b2c..a10b3465619e8 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -334,6 +334,11 @@ stdenv.mkDerivation (rec { inherit (ghc.meta) license platforms; # ghcHEAD times out on aarch64-linux on Hydra. hydraPlatforms = builtins.filter (p: p != "aarch64-linux") ghc.meta.platforms; + # While GHC >= 8.10.7 builds and works to an extent on aarch64-darwin, + # there are multiple unresolved issues degrading the quality of the + # `haskellPackages` set. As such, we can't call it a supported platform. + # Use `config.allowUnsupportedSystem` if you are feeling adventurous. + badPlatforms = [ "aarch64-darwin" ]; }; dontStrip = (targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm);