nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 142 lines 5.0 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 # Doctests fail on aarch64 due to a GHCi linking bug 57 # https://gitlab.haskell.org/ghc/ghc/-/issues/15275#note_295437 58 # TODO: figure out if needed on aarch32 as well 59 BNFC = dontCheck super.BNFC; 60 C-structs = dontCheck super.C-structs; 61 Chart-tests = dontCheck super.Chart-tests; 62 Jikka = dontCheck super.Jikka; 63 accelerate = dontCheck super.accelerate; 64 ad = dontCheck super.ad; 65 autoapply = dontCheck super.autoapply; 66 construct = dontCheck super.construct; 67 exact-real = dontCheck super.exact-real; 68 flight-kml = dontCheck super.flight-kml; 69 focuslist = dontCheck super.focuslist; 70 grammatical-parsers = dontCheck super.grammatical-parsers; 71 greskell = dontCheck super.greskell; 72 groupBy = dontCheck super.groupBy; 73 haskell-time-range = dontCheck super.haskell-time-range; 74 headroom = dontCheck super.headroom; 75 hgeometry = dontCheck super.hgeometry; 76 hhp = dontCheck super.hhp; 77 hsakamai = dontCheck super.hsakamai; 78 hsemail-ns = dontCheck super.hsemail-ns; 79 html-validator-cli = dontCheck super.html-validator-cli; 80 hw-fingertree-strict = dontCheck super.hw-fingertree-strict; 81 hw-packed-vector = dontCheck super.hw-packed-vector; 82 hw-prim = dontCheck super.hw-prim; 83 hw-xml = dontCheck super.hw-xml; 84 language-nix = dontCheck super.language-nix; 85 lens-regex = dontCheck super.lens-regex; 86 meep = dontCheck super.meep; 87 openapi3 = dontCheck super.openapi3; 88 orbits = dontCheck super.orbits; 89 ranged-list = dontCheck super.ranged-list; 90 rank2classes = dontCheck super.rank2classes; 91 schedule = dontCheck super.schedule; 92 static = dontCheck super.static; 93 strict-writer = dontCheck super.strict-writer; 94 termonad = dontCheck super.termonad; 95 trifecta = dontCheck super.trifecta; 96 twiml = dontCheck super.twiml; 97 twitter-conduit = dontCheck super.twitter-conduit; 98 validationt = dontCheck super.validationt; 99 vgrep = dontCheck super.vgrep; 100 vinyl = dontCheck super.vinyl; 101 vulkan-utils = dontCheck super.vulkan-utils; 102 xml-html-qq = dontCheck super.xml-html-qq; 103 yaml-combinators = dontCheck super.yaml-combinators; 104 yesod-paginator = dontCheck super.yesod-paginator; 105 106 # https://github.com/ekmett/half/issues/35 107 half = dontCheck super.half; 108 109 # We disable profiling on aarch64, so tests naturally fail 110 ghc-prof = dontCheck super.ghc-prof; 111 112 # Similar RTS issue in test suite: 113 # rts/linker/elf_reloc_aarch64.c:98: encodeAddendAarch64: Assertion `isInt64(21+12, addend)' failed. 114 # These still fail sporadically on ghc 9.2 115} 116// lib.optionalAttrs pkgs.stdenv.hostPlatform.isAarch32 { 117 # AARCH32-SPECIFIC OVERRIDES 118 119 # KAT/ECB/D2 test segfaults on armv7l 120 # https://github.com/haskell-crypto/cryptonite/issues/367 krank:ignore-line 121 cryptonite = dontCheck super.cryptonite; 122} 123// lib.optionalAttrs (with pkgs.stdenv.hostPlatform; isAarch && isAndroid) { 124 # android is not currently allowed as 'supported-platforms' by hackage2nix 125 android-activity = unmarkBroken super.android-activity; 126} 127// lib.optionalAttrs (with pkgs.stdenv.hostPlatform; !isDarwin) { 128 # 2026-01-09: RNG tests that need rng-instruction support fail on NixOS's 129 # aarch64-linux build infrastructure 130 botan-low = overrideCabal (drv: { 131 testFlags = 132 drv.testFlags or [ ] 133 ++ (lib.concatMap (x: [ "--skip" ] ++ [ x ]) [ 134 # botan-low-rng-tests 135 "/rdrand/rngInit/" 136 "/rdrand/rngGet/" 137 "/rdrand/rngReseed/" 138 "/rdrand/rngReseedFromRNGCtx/" 139 "/rdrand/rngAddEntropy/" 140 ]); 141 }) super.botan-low; 142}