summaryrefslogtreecommitdiff
path: root/default.nix
blob: 8ae54ccf08bb867d01e85e5c8622ec2627220b58 (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
32
33
34
35
36
37
38
39
{ pkgs ? (import <nixpkgs> {})
, compilerName ? "ghc801"
}:

rec {
  # haskellPackages = pkgs.haskell.packages."${compilerName}";
  haskellPackages = pkgs.haskell.packages."${compilerName}".override {
    overrides = self: super: {
      Shellac = pkgs.stdenv.lib.overrideDerivation super.Shellac (oldAttrs: {
        src = pkgs.fetchFromGitHub {
          owner = "pngwjpgh";
          repo = "shellac";
          rev = "b88a92bace5106e7446bc81688d675994f829282";
          sha256 = "1qpnbnclz1xwisg9wgs4yl8y0ral01pqy8jnq6g7z1xbc8p6qn0i";
        };
      });
      Shellac-haskeline = pkgs.stdenv.lib.overrideDerivation super.Shellac-haskeline (oldAttrs: {
        src = pkgs.fetchFromGitHub {
          owner = "pngwjpgh";
          repo = "shellac";
          rev = "b88a92bace5106e7446bc81688d675994f829282";
          sha256 = "1qpnbnclz1xwisg9wgs4yl8y0ral01pqy8jnq6g7z1xbc8p6qn0i";
        };
        unpackPhase = "cp -r $src/shellac-haskeline/. .";
      });
      game-probability = pkgs.stdenv.lib.overrideDerivation super.game-probability (oldAttrs: {
        patchPhase = ''
          sed -i -e 's|random.*==[^,]*|random|; w /dev/stdout' -e 's|containers.*>=[^,]*|containers|; w /dev/stdout' game-probability.cabal
        '';
      });
      table-layout = pkgs.stdenv.lib.overrideDerivation super.table-layout (oldAttrs: {
        patchPhase = ''
          sed -i -e 's|data-default-class.*==[^,]*|data-default-class|; w /dev/stdout' table-layout.cabal
        '';
      });
    };
  };
  sequence = haskellPackages.callPackage ./sequence.nix {};
}