nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 141 lines 3.7 kB view raw
1{ pkgs, haskellLib }: 2 3self: super: 4 5with haskellLib; 6 7let 8 inherit (pkgs) lib; 9 10 warnAfterVersion = 11 ver: pkg: 12 lib.warnIf (lib.versionOlder ver 13 super.${pkg.pname}.version 14 ) "override for haskell.packages.ghc910.${pkg.pname} may no longer be needed" pkg; 15 16in 17 18{ 19 # Disable GHC core libraries 20 array = null; 21 base = null; 22 binary = null; 23 bytestring = null; 24 Cabal = null; 25 Cabal-syntax = null; 26 containers = null; 27 deepseq = null; 28 directory = null; 29 exceptions = null; 30 filepath = null; 31 ghc-bignum = null; 32 ghc-boot = null; 33 ghc-boot-th = null; 34 ghc-compact = null; 35 ghc-experimental = null; 36 ghc-heap = null; 37 ghc-internal = null; 38 ghc-platform = null; 39 ghc-prim = null; 40 ghc-toolchain = null; 41 ghci = null; 42 haskeline = null; 43 hpc = null; 44 integer-gmp = null; 45 mtl = null; 46 os-string = null; 47 parsec = null; 48 pretty = null; 49 process = null; 50 rts = null; 51 semaphore-compat = null; 52 stm = 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 Win32 = null; 67 68 # “Unfortunately we are unable to support GHC 9.10.” 69 apply-refact = dontDistribute (markBroken super.apply-refact); 70 71 stack = 72 # Setup.hs depends on Cabal-syntax >= 3.14 73 overrideCabal 74 (drv: { 75 setupHaskellDepends = drv.setupHaskellDepends or [ ] ++ [ 76 self.Cabal-syntax_3_14_2_0 77 self.Cabal_3_14_2_0 78 ]; 79 # We need to tell GHC to ignore the Cabal core libraries while 80 # compiling Setup.hs since it depends on Cabal >= 3.14. 81 # ATTN: This override assumes we are using GHC 9.10.3 since we need 82 # to give an exact Cabal version at the GHC (!) command line. 83 # FIXME(@sternenseemann): make direct argument to generic-builder.nix 84 env = drv.env or { } // { 85 setupCompileFlags = lib.concatStringsSep " " [ 86 "-hide-package" 87 "Cabal-syntax-3.12.1.0" 88 "-hide-package" 89 "Cabal-3.12.1.0" 90 ]; 91 }; 92 }) 93 94 # Stack itself depends on Cabal >= 3.14 which also needs to be updated for deps 95 ( 96 super.stack.overrideScope ( 97 sself: ssuper: 98 let 99 upgradeCabal = 100 drv: 101 lib.pipe drv [ 102 (addBuildDepends [ sself.Cabal_3_14_2_0 ]) 103 (appendConfigureFlags [ "--constraint=Cabal>=3.14" ]) 104 ]; 105 in 106 { 107 pantry = upgradeCabal ssuper.pantry_0_11_2; 108 rio-prettyprint = upgradeCabal ssuper.rio-prettyprint; 109 hackage-security = upgradeCabal ssuper.hackage-security; 110 hpack = upgradeCabal sself.hpack_0_39_1; 111 stack = upgradeCabal ssuper.stack; 112 } 113 ) 114 ); 115 116 # 117 # Version upgrades 118 # 119 120 # Upgrade to accommodate new core library versions, where the authors have 121 # already made the relevant changes. 122 123 # 124 # Jailbreaks 125 # 126 floskell = doJailbreak super.floskell; # base <4.20 127 # 2025-04-09: filepath <1.5 128 haddock-library = 129 assert super.haddock-library.version == "1.11.0"; 130 doJailbreak super.haddock-library; 131 tree-sitter = doJailbreak super.tree-sitter; # containers <0.7, filepath <1.5 132 133 # 134 # Test suite issues 135 # 136 monad-dijkstra = dontCheck super.monad-dijkstra; # needs hlint 3.10 137 138 # Workaround https://github.com/haskell/haskell-language-server/issues/4674 139 haskell-language-server = haskellLib.disableCabalFlag "hlint" super.haskell-language-server; 140 141}