/
shell.nix
29 lines (22 loc) · 950 Bytes
/
shell.nix
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
{ nixpkgs ? import <nixos-unstable> {}, compiler ? "ghc822", doBenchmark ? false }:
let
pkgs = nixpkgs;
f = import ./default.nix;
haskellPackages = pkgs.haskell.packages.${compiler}.override {
overrides = haskellNew: haskellOld: rec {
# We want to enable profiling for all our dependencies in nix-shell
# so we can profile stuff!
mkDerivation = args: haskellOld.mkDerivation (args // {
enableLibraryProfiling = true;
});
# OpenGLRaw segfaults when we try to build it's haddocks
OpenGLRaw = pkgs.haskell.lib.dontHaddock haskellOld.OpenGLRaw;
# these tests take _forever_
linear = pkgs.haskell.lib.dontCheck haskellOld.linear;
happy = pkgs.haskell.lib.dontCheck haskellOld.happy;
};
};
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
drv = variant (haskellPackages.callPackage f {});
in
if pkgs.lib.inNixShell then drv.env else drv