at master 4.6 kB view raw
1# ARM-SPECIFIC OVERRIDES FOR THE HASKELL PACKAGE SET IN NIXPKGS 2# 3# This extension is applied to all haskell package sets in nixpkgs if 4# `stdenv.hostPlatform.isAarch` to apply arm specific workarounds or 5# fixes. 6# 7# The file is split into three parts: 8# 9# * Overrides that are applied for all arm platforms 10# * Overrides for aarch32 platforms 11# * Overrides for aarch64 platforms 12# 13# This may be extended in the future to also include compiler- 14# specific sections as compiler and linker related bugs may 15# get fixed subsequently. 16# 17# When adding new overrides, try to research which section they 18# belong into. Most likely we'll be favouring aarch64 overrides 19# in practice since that is the only platform we can test on 20# Hydra. Also take care to group overrides by the issue they 21# solve, so refactors and updates to this file are less tedious. 22{ pkgs, haskellLib }: 23 24let 25 inherit (pkgs) lib; 26in 27 28with haskellLib; 29 30self: super: 31{ 32 # COMMON ARM OVERRIDES 33 34 # moved here from configuration-common.nix, no reason given. 35 servant-docs = dontCheck super.servant-docs; 36 swagger2 = dontHaddock (dontCheck super.swagger2); 37 38 # Similar to https://ghc.haskell.org/trac/ghc/ticket/13062 39 happy = dontCheck super.happy; 40 41 # add arm specific library 42 wiringPi = overrideCabal ( 43 { 44 librarySystemDepends ? [ ], 45 ... 46 }: 47 { 48 librarySystemDepends = librarySystemDepends ++ [ pkgs.wiringpi ]; 49 } 50 ) super.wiringPi; 51 52} 53// lib.optionalAttrs pkgs.stdenv.hostPlatform.isAarch64 { 54 # AARCH64-SPECIFIC OVERRIDES 55 56 # Corrupted store path https://github.com/NixOS/nixpkgs/pull/272097#issuecomment-1848414265 57 cachix = triggerRebuild 1 super.cachix; 58 59 # Doctests fail on aarch64 due to a GHCi linking bug 60 # https://gitlab.haskell.org/ghc/ghc/-/issues/15275#note_295437 61 # TODO: figure out if needed on aarch32 as well 62 BNFC = dontCheck super.BNFC; 63 C-structs = dontCheck super.C-structs; 64 Chart-tests = dontCheck super.Chart-tests; 65 Jikka = dontCheck super.Jikka; 66 accelerate = dontCheck super.accelerate; 67 ad = dontCheck super.ad; 68 autoapply = dontCheck super.autoapply; 69 construct = dontCheck super.construct; 70 exact-real = dontCheck super.exact-real; 71 flight-kml = dontCheck super.flight-kml; 72 focuslist = dontCheck super.focuslist; 73 grammatical-parsers = dontCheck super.grammatical-parsers; 74 greskell = dontCheck super.greskell; 75 groupBy = dontCheck super.groupBy; 76 haskell-time-range = dontCheck super.haskell-time-range; 77 headroom = dontCheck super.headroom; 78 hgeometry = dontCheck super.hgeometry; 79 hhp = dontCheck super.hhp; 80 hsakamai = dontCheck super.hsakamai; 81 hsemail-ns = dontCheck super.hsemail-ns; 82 html-validator-cli = dontCheck super.html-validator-cli; 83 hw-fingertree-strict = dontCheck super.hw-fingertree-strict; 84 hw-packed-vector = dontCheck super.hw-packed-vector; 85 hw-prim = dontCheck super.hw-prim; 86 hw-xml = dontCheck super.hw-xml; 87 language-nix = dontCheck super.language-nix; 88 lens-regex = dontCheck super.lens-regex; 89 meep = dontCheck super.meep; 90 openapi3 = dontCheck super.openapi3; 91 orbits = dontCheck super.orbits; 92 ranged-list = dontCheck super.ranged-list; 93 rank2classes = dontCheck super.rank2classes; 94 schedule = dontCheck super.schedule; 95 static = dontCheck super.static; 96 strict-writer = dontCheck super.strict-writer; 97 termonad = dontCheck super.termonad; 98 trifecta = dontCheck super.trifecta; 99 twiml = dontCheck super.twiml; 100 twitter-conduit = dontCheck super.twitter-conduit; 101 validationt = dontCheck super.validationt; 102 vgrep = dontCheck super.vgrep; 103 vinyl = dontCheck super.vinyl; 104 vulkan-utils = dontCheck super.vulkan-utils; 105 xml-html-qq = dontCheck super.xml-html-qq; 106 yaml-combinators = dontCheck super.yaml-combinators; 107 yesod-paginator = dontCheck super.yesod-paginator; 108 109 # https://github.com/ekmett/half/issues/35 110 half = dontCheck super.half; 111 112 # We disable profiling on aarch64, so tests naturally fail 113 ghc-prof = dontCheck super.ghc-prof; 114 115 # Similar RTS issue in test suite: 116 # rts/linker/elf_reloc_aarch64.c:98: encodeAddendAarch64: Assertion `isInt64(21+12, addend)' failed. 117 # These still fail sporadically on ghc 9.2 118} 119// lib.optionalAttrs pkgs.stdenv.hostPlatform.isAarch32 { 120 # AARCH32-SPECIFIC OVERRIDES 121 122 # KAT/ECB/D2 test segfaults on armv7l 123 # https://github.com/haskell-crypto/cryptonite/issues/367 124 cryptonite = dontCheck super.cryptonite; 125} 126// lib.optionalAttrs (with pkgs.stdenv.hostPlatform; isAarch && isAndroid) { 127 # android is not currently allowed as 'supported-platforms' by hackage2nix 128 android-activity = unmarkBroken super.android-activity; 129}