about summary refs log blame commit diff
path: root/third_party/overlays/haskell/default.nix
blob: 16c250f820049c3d803c4688b2c95ab81162e0d5 (plain) (tree)
1
2
3
4
5
6
7
8


                                                                    

                                                
 
                                                         
 



                                                              
 


                                                            
 



                                                                                
                                        
 















                                                                        
 
# Defines an overlay for overriding Haskell packages, for example to
# avoid breakage currently present in nixpkgs or to modify package
# versions.

{ ... }: # This file needs nothing from readTree

self: super: # overlay parameters for the nixpkgs overlay

let
  overrides = hsSelf: hsSuper: with super.haskell.lib; rec {
    generic-arbitrary = appendPatch hsSuper.generic-arbitrary
      [ ./patches/generic-arbitrary-export-garbitrary.patch ];

    # check dependencies cause circular dependency on itself
    # and thus an infinite recursion
    random = dontCheck hsSuper.random_1_2_0;

    # random <1.2
    test-framework = doJailbreak hsSuper.test-framework;
    hashable = doJailbreak hsSuper.hashable;
    test-framework-quickcheck2 = doJailbreak hsSuper.test-framework-quickcheck2;
    pandoc = doJailbreak hsSuper.pandoc;

    # can be removed if we have the following PR or equivalent
    # https://github.com/NixOS/nixpkgs/pull/116931
    hedgehog-classes = overrideCabal hsSuper.hedgehog-classes (attrs: {
      # remove version bound on semirings which is inside a
      # conditional, so doJailbreak doesn't work
      prePatch = ''
        sed -i 's|semirings.*0.6|semirings|g' hedgehog-classes.cabal
      '';
    });

    hgeometry-combinatorial = dontCheck hsSuper.hgeometry-combinatorial;
  };
in {
  haskellPackages = super.haskellPackages.override {
    inherit overrides;
  };
}