aboutsummaryrefslogtreecommitdiff
path: root/shell.nix
blob: b1a597fde91b352e732030f9e539d1e8b48b714e (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
40
let

  all-hies = fetchTarball {
    url = "https://github.com/infinisil/all-hies/tarball/534ac517b386821b787d1edbd855b9966d0c0775";
    sha256 = "0bw1llpwxbh1dnrnbxkj2l0j58s523hjivszf827c3az5i4py1i2";
  };

  pkgs = import <nixpkgs> {
    # Pass no config for purity
    config = {};
    overlays = [
      (import all-hies {}).overlay
    ];
  };

  inherit (pkgs) haskellPackages;

  haskellDeps = ps: with ps; [
    base
    lens
    parsec
    mtl
    readline
  ];

  ghc = haskellPackages.ghcWithPackages haskellDeps;

  externalPackages = [
    ghc
    pkgs.gdb
    pkgs.cabal2nix
    haskellPackages.cabal-install
    haskellPackages.hie
    haskellPackages.hoogle
  ];
in
pkgs.stdenv.mkDerivation {
  name = "env";
  buildInputs = externalPackages;
}