Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 108 lines 2.7 kB view raw
1{ pkgs, haskellLib }: 2 3self: super: 4 5with haskellLib; 6 7let 8 inherit (pkgs.stdenv.hostPlatform) isDarwin; 9 inherit (pkgs) lib; 10 11 warnAfterVersion = 12 ver: pkg: 13 lib.warnIf (lib.versionOlder ver 14 super.${pkg.pname}.version 15 ) "override for haskell.packages.ghc912.${pkg.pname} may no longer be needed" pkg; 16 17in 18 19{ 20 21 llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages; 22 23 # Disable GHC core libraries. 24 array = null; 25 base = null; 26 binary = null; 27 bytestring = null; 28 Cabal = null; 29 Cabal-syntax = null; 30 containers = null; 31 deepseq = null; 32 directory = null; 33 exceptions = null; 34 filepath = null; 35 ghc-bignum = null; 36 ghc-boot = null; 37 ghc-boot-th = null; 38 ghc-compact = null; 39 ghc-heap = null; 40 ghc-prim = null; 41 ghci = null; 42 haskeline = null; 43 hpc = null; 44 integer-gmp = null; 45 libiserv = null; 46 mtl = null; 47 parsec = null; 48 pretty = null; 49 process = null; 50 rts = null; 51 stm = null; 52 semaphore-compat = null; 53 system-cxx-std-lib = null; 54 template-haskell = null; 55 # GHC only builds terminfo if it is a native compiler 56 terminfo = 57 if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then 58 null 59 else 60 doDistribute self.terminfo_0_4_1_7; 61 text = null; 62 time = null; 63 transformers = null; 64 unix = null; 65 xhtml = null; 66 67 # 68 # Version upgrades 69 # 70 megaparsec = doDistribute self.megaparsec_9_7_0; 71 ghc-tags = self.ghc-tags_1_8; 72 73 # 74 # Jailbreaks 75 # 76 hashing = doJailbreak super.hashing; # bytestring <0.12 77 hevm = appendPatch (pkgs.fetchpatch { 78 url = "https://github.com/hellwolf/hevm/commit/338674d1fe22d46ea1e8582b24c224d76d47d0f3.patch"; 79 name = "release-0.54.2-ghc-9.8.4-patch"; 80 sha256 = "sha256-Mo65FfP1nh7QTY+oLia22hj4eV2v9hpXlYsrFKljA3E="; 81 }) super.hevm; 82 HaskellNet-SSL = doJailbreak super.HaskellNet-SSL; # bytestring >=0.9 && <0.12 83 inflections = doJailbreak super.inflections; # text >=0.2 && <2.1 84 85 # 86 # Test suite issues 87 # 88 pcre-heavy = dontCheck super.pcre-heavy; # GHC warnings cause the tests to fail 89 90 # 91 # Other build fixes 92 # 93 94 # 2023-12-23: It needs this to build under ghc-9.6.3. 95 # A factor of 100 is insufficient, 200 seems seems to work. 96 hip = appendConfigureFlag "--ghc-options=-fsimpl-tick-factor=200" super.hip; 97 98 # 2025-04-21: "flavor" for GHC 9.8.5 is missing a fix introduced for 9.8.4. See: 99 # https://github.com/digital-asset/ghc-lib/pull/571#discussion_r2052684630 100 ghc-lib-parser = warnAfterVersion "9.8.5.20250214" ( 101 overrideCabal { 102 postPatch = '' 103 substituteInPlace compiler/cbits/genSym.c \ 104 --replace-fail "HsWord64 u = atomic_inc64" "HsWord64 u = atomic_inc" 105 ''; 106 } super.ghc-lib-parser 107 ); 108}