summaryrefslogtreecommitdiffstats
path: root/pkgs/haskell/default.nix
blob: df900968327d904fa84bcf40bfaffa93eaec1edd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
let
  overrides = { lib, mylib }: self: super:
    mylib.mapNixDir (path: self.callPackage path {}) [
      ./.
    ] // {
      xmonad-tv = self.callPackage ./xmonad-tv {
        pager = self.desktop-pager;
      };
    };
in
  self: super: let
    inherit (super) lib mylib;
  in {
    haskell = super.haskell // {
      packages = lib.mapAttrs (name: value:
        if builtins.hasAttr "override" value
          then value.override (old: {
            overrides =
              lib.composeExtensions (old.overrides or (_: _: { })) (overrides { inherit lib mylib; });
          })
          else value
      ) super.haskell.packages;
    };
    haskellPackages = super.haskellPackages.override (old: {
      overrides =
        lib.composeExtensions (old.overrides or (_: _: { })) (overrides { inherit lib mylib; });
    });
  }