forked from juspay/streamly-extras
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
46 lines (46 loc) · 1.26 KB
/
default.nix
File metadata and controls
46 lines (46 loc) · 1.26 KB
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
{
withHoogle ? true
}:
let
inherit (import <nixpkgs> {}) fetchFromGitHub;
nixpkgs = fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "e8a36cdf57193e56514aa6eeff936159372f0ace";
sha256 = "1jxdqphacpzkvwpkw67w1222jnmyplzall4n9sdwznyipxz6bqsv";
};
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;
# Haskell actually has a broken package called vision
streamly-extras =
self.callPackage ./streamly-extras.nix { };
streamly =
self.callPackage ./streamly.nix { };
};
};
};
};
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
stylish-haskell
] ++ [ zlib ] ++ attrs.buildInputs;
})
else drv