Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 97 lines 3.4 kB view raw
1{ pkgs, haskellLib }: 2 3with haskellLib; 4 5let 6 inherit (pkgs.stdenv.hostPlatform) isDarwin; 7in 8 9self: super: { 10 11 # Should be llvmPackages_6 which has been removed from nixpkgs, 12 # create attribute set to prevent eval errors. 13 llvmPackages = { 14 llvm = null; 15 clang = null; 16 }; 17 18 # Disable GHC 8.6.x core libraries. 19 array = null; 20 base = null; 21 binary = null; 22 bytestring = null; 23 Cabal = null; 24 containers = null; 25 deepseq = null; 26 directory = null; 27 filepath = null; 28 ghc-boot = null; 29 ghc-boot-th = null; 30 ghc-compact = null; 31 ghc-heap = null; 32 ghc-prim = null; 33 ghci = null; 34 haskeline = null; 35 hpc = null; 36 integer-gmp = null; 37 libiserv = null; 38 mtl = null; 39 parsec = null; 40 pretty = null; 41 process = null; 42 rts = null; 43 stm = null; 44 template-haskell = null; 45 # GHC only builds terminfo if it is a native compiler 46 terminfo = 47 if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then 48 null 49 else 50 doDistribute self.terminfo_0_4_1_7; 51 text = null; 52 time = null; 53 transformers = null; 54 unix = null; 55 # GHC only bundles the xhtml library if haddock is enabled, check if this is 56 # still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463 57 xhtml = if self.ghc.hasHaddock or true then null else doDistribute self.xhtml_3000_4_0_0; 58 59 # Need the Cabal-syntax-3.6.0.0 fake package for Cabal < 3.8 to allow callPackage and the constraint solver to work 60 Cabal-syntax = self.Cabal-syntax_3_6_0_0; 61 # These core package only exist for GHC >= 9.4. The best we can do is feign 62 # their existence to callPackages, but their is no shim for lower GHC versions. 63 system-cxx-std-lib = null; 64 65 # Becomes a core package in GHC >= 9.8 66 semaphore-compat = doDistribute self.semaphore-compat_1_0_0; 67 68 # Needs Cabal 3.0.x. 69 jailbreak-cabal = super.jailbreak-cabal.overrideScope (cself: _: { Cabal = cself.Cabal_3_2_1_0; }); 70 71 # Test suite does not compile. 72 data-clist = doJailbreak super.data-clist; # won't cope with QuickCheck 2.12.x 73 dates = doJailbreak super.dates; # base >=4.9 && <4.12 74 HaTeX = doJailbreak super.HaTeX; # containers >=0.4 && <0.6 is too tight; https://github.com/Daniel-Diaz/HaTeX/issues/126 75 hpc-coveralls = doJailbreak super.hpc-coveralls; # https://github.com/guillaume-nargeot/hpc-coveralls/issues/82 76 http-api-data = doJailbreak super.http-api-data; 77 wl-pprint-extras = doJailbreak super.wl-pprint-extras; # containers >=0.4 && <0.6 is too tight; https://github.com/ekmett/wl-pprint-extras/issues/17 78 rebase = doJailbreak super.rebase; # time ==1.9.* is too low 79 80 # cabal2nix needs the latest version of Cabal, and the one 81 # hackage-db uses must match, so take the latest 82 cabal2nix = super.cabal2nix.overrideScope (self: super: { Cabal = self.Cabal_3_2_1_0; }); 83 84 # cabal2spec needs a recent version of Cabal 85 cabal2spec = super.cabal2spec.overrideScope (self: super: { Cabal = self.Cabal_3_2_1_0; }); 86 87 # ghc versions prior to 8.8.x needs additional dependency to compile successfully. 88 ghc-lib-parser-ex = addBuildDepend self.ghc-lib-parser super.ghc-lib-parser-ex; 89 90 # Needs base-orphans for GHC < 9.8 / base < 4.19 91 some = addBuildDepend self.base-orphans super.some; 92 93 # This became a core library in ghc 8.10., so we don’t have an "exception" attribute anymore. 94 exceptions = self.exceptions_0_10_9; 95 96 mime-string = disableOptimization super.mime-string; 97}