Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 130 lines 4.7 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 happy_1_19_12 = doDistribute (dontCheck super.happy_1_19_12); 41 42 # add arm specific library 43 wiringPi = overrideCabal ( 44 { 45 librarySystemDepends ? [ ], 46 ... 47 }: 48 { 49 librarySystemDepends = librarySystemDepends ++ [ pkgs.wiringpi ]; 50 } 51 ) super.wiringPi; 52 53} 54// lib.optionalAttrs pkgs.stdenv.hostPlatform.isAarch64 { 55 # AARCH64-SPECIFIC OVERRIDES 56 57 # Corrupted store path https://github.com/NixOS/nixpkgs/pull/272097#issuecomment-1848414265 58 cachix = triggerRebuild 1 super.cachix; 59 60 # Doctests fail on aarch64 due to a GHCi linking bug 61 # https://gitlab.haskell.org/ghc/ghc/-/issues/15275#note_295437 62 # TODO: figure out if needed on aarch32 as well 63 BNFC = dontCheck super.BNFC; 64 C-structs = dontCheck super.C-structs; 65 Chart-tests = dontCheck super.Chart-tests; 66 Jikka = dontCheck super.Jikka; 67 accelerate = dontCheck super.accelerate; 68 ad = dontCheck super.ad; 69 autoapply = dontCheck super.autoapply; 70 construct = dontCheck super.construct; 71 exact-real = dontCheck super.exact-real; 72 flight-kml = dontCheck super.flight-kml; 73 focuslist = dontCheck super.focuslist; 74 grammatical-parsers = dontCheck super.grammatical-parsers; 75 greskell = dontCheck super.greskell; 76 groupBy = dontCheck super.groupBy; 77 haskell-time-range = dontCheck super.haskell-time-range; 78 headroom = dontCheck super.headroom; 79 hgeometry = dontCheck super.hgeometry; 80 hhp = dontCheck super.hhp; 81 hsakamai = dontCheck super.hsakamai; 82 hsemail-ns = dontCheck super.hsemail-ns; 83 html-validator-cli = dontCheck super.html-validator-cli; 84 hw-fingertree-strict = dontCheck super.hw-fingertree-strict; 85 hw-packed-vector = dontCheck super.hw-packed-vector; 86 hw-prim = dontCheck super.hw-prim; 87 hw-xml = dontCheck super.hw-xml; 88 language-nix = dontCheck super.language-nix; 89 lens-regex = dontCheck super.lens-regex; 90 meep = dontCheck super.meep; 91 openapi3 = dontCheck super.openapi3; 92 orbits = dontCheck super.orbits; 93 ranged-list = dontCheck super.ranged-list; 94 rank2classes = dontCheck super.rank2classes; 95 schedule = dontCheck super.schedule; 96 static = dontCheck super.static; 97 strict-writer = dontCheck super.strict-writer; 98 termonad = dontCheck super.termonad; 99 trifecta = dontCheck super.trifecta; 100 twiml = dontCheck super.twiml; 101 twitter-conduit = dontCheck super.twitter-conduit; 102 validationt = dontCheck super.validationt; 103 vgrep = dontCheck super.vgrep; 104 vinyl = dontCheck super.vinyl; 105 vulkan-utils = dontCheck super.vulkan-utils; 106 xml-html-qq = dontCheck super.xml-html-qq; 107 yaml-combinators = dontCheck super.yaml-combinators; 108 yesod-paginator = dontCheck super.yesod-paginator; 109 110 # https://github.com/ekmett/half/issues/35 111 half = dontCheck super.half; 112 113 # We disable profiling on aarch64, so tests naturally fail 114 ghc-prof = dontCheck super.ghc-prof; 115 116 # Similar RTS issue in test suite: 117 # rts/linker/elf_reloc_aarch64.c:98: encodeAddendAarch64: Assertion `isInt64(21+12, addend)' failed. 118 # These still fail sporadically on ghc 9.2 119} 120// lib.optionalAttrs pkgs.stdenv.hostPlatform.isAarch32 { 121 # AARCH32-SPECIFIC OVERRIDES 122 123 # KAT/ECB/D2 test segfaults on armv7l 124 # https://github.com/haskell-crypto/cryptonite/issues/367 125 cryptonite = dontCheck super.cryptonite; 126} 127// lib.optionalAttrs (with pkgs.stdenv.hostPlatform; isAarch && isAndroid) { 128 # android is not currently allowed as 'supported-platforms' by hackage2nix 129 android-activity = unmarkBroken super.android-activity; 130}