-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
33 lines (31 loc) · 978 Bytes
/
default.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
30
31
32
33
{ compiler ? "ghc8104", pkgs ? import <nixpkgs> {} }:
let
getvolume = pkgs.callPackage ./getvolume/default.nix {};
packageSet = pkgs.haskell.packages.${compiler};
haskellPackages =
packageSet.override {
overrides = (
self: super:
{
ghc = super.ghc // { withPackages = super.ghc.withHoogle; };
ghcWithPackages = self.ghc.withPackages;
async-timer = (pkgs.haskell.lib.doJailbreak (pkgs.haskell.lib.dontCheck super.async-timer));
}
);
};
raw = haskellPackages.callCabal2nix "barbq" ./. {};
drv = pkgs.symlinkJoin {
name = "barbq";
paths = [ raw getvolume ];
};
in
{
barbq = drv;
barbq-shell = haskellPackages.shellFor {
packages = p: [ raw ];
shellHook = ''
export HIE_HOOGLE_DATABASE="$(cat $(which hoogle) | sed -n -e 's|.*--database \(.*\.hoo\).*|\1|p')"
'';
buildInputs = with pkgs; [ cabal-install hlint ghcid getvolume pkgs.libiconv ];
};
}