-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdefault.nix
58 lines (56 loc) · 1.9 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
withHoogle ? true
}:
let
inherit (import <nixpkgs> {}) fetchFromGitHub;
nixpkgs = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/20.03.tar.gz";
sha256 = "0182ys095dfx02vl2a20j1hz92dx3mfgz2a6fhn31bqlp1wa8hlq";
};
config = {
packageOverrides = pkgs: rec {
haskellPackages = pkgs.haskellPackages.override {
overrides = self: super: rec {
ghc =
super.ghc // { withPackages = if withHoogle then super.ghc.withHoogle else super.ghc ; };
ghcWithPackages =
self.ghc.withPackages;
streamly-extras =
self.callPackage ./streamly-extras.nix { };
fusion-plugin-types =
pkgs.haskell.lib.dontCheck
(self.callCabal2nix "fusion-plugin-types" (pkgs.fetchgit {
url = "https://github.com/composewell/fusion-plugin-types.git";
rev = "1a7e1c39b4496543b2dc95d59aafbf44041554f1";
sha256 = "1mmph6gawi4cbsqmswawi1c951f6pq41qfqjbvnygm36d2qfv64i";
fetchSubmodules = true;
}) { });
streamly =
pkgs.haskell.lib.dontCheck
(self.callCabal2nix "streamly" (pkgs.fetchgit {
url = "https://github.com/composewell/streamly.git";
rev = "500d187b8fb5b6b1bc424725dd179650fb41c49c";
sha256 = "175cqn0sxg8r32f3dd0alkivkvjrwhmwm7xkmf4ki2j68smmjc3y";
fetchSubmodules = true;
}) { });
};
};
};
};
pkgs = import nixpkgs { inherit config; };
drv = pkgs.haskellPackages.streamly-extras;
in
if pkgs.lib.inNixShell
then
drv.env.overrideAttrs(attrs:
{ buildInputs =
with pkgs.haskellPackages;
[
cabal-install
cabal2nix
ghcid
hindent
hlint
] ++ [ zlib ] ++ attrs.buildInputs;
})
else drv