summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/xmobar/stackage.nix
blob: c162ca2c6756eb3296fbbaf1b10fe98fcdf7adb4 (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
29
30
31
{ nixpkgs ? import ./nixpkgs.nix {}
, snapshot ? "lts-13.21"
}:

let
  stackage = import (fetchTarball {
    url = "https://stackage.serokell.io/zb36jsy3r5h4ydz0pnp00g9vk94dvv03-stackage/default.nix.tar.gz";
    sha256 = "0h6f80gds0ds77y51hhiadh2h2k8njqq8n0gayp729ana9m9agma";
  });

  overlays =
    [ stackage."${snapshot}"
      (self: super: {
          haskell = super.haskell // {
            packages = super.haskell.packages // {
              "${snapshot}" = super.haskell.packages."${snapshot}".override {
                overrides = hself: hsuper: {
                  zip-archive = self.haskell.lib.overrideCabal hsuper.zip-archive (old: {
                    testToolDepends = old.testToolDepends ++ (with self; [ unzip which ]);
                  });
                  alex = self.haskell.lib.dontCheck hsuper.alex;
                };
              };
            };
          };
        }
      )
    ];

  inherit (nixpkgs { inherit overlays; }) pkgs;
in pkgs.haskell.packages."${snapshot}"