-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
56 lines (49 loc) · 1.79 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
# CAUTION! a spelling mistake in arg string is ignored silently.
#
# To use ghc-8.10.7
# nix-shell --argstr compiler "ghc8107"
{
nixpkgs ?
import (builtins.fetchTarball
https://github.com/NixOS/nixpkgs/archive/refs/tags/22.05.tar.gz)
{}
, compiler ? "ghc922"
}:
let
utils =
let src = fetchGit {
url = "[email protected]:composewell/composewell-haskell.git";
ref = "master";
}; in (import "${src}/utils.nix") { inherit nixpkgs; };
haskellPackages =
let src = fetchGit {
url = "[email protected]:composewell/composewell-haskell.git";
ref = "master";
}; in (import "${src}/haskellPackages.nix")
{ inherit nixpkgs;
inherit compiler; };
mkHaskellPackages = inShell:
haskellPackages.override (old: {
overrides =
nixpkgs.lib.composeExtensions
(old.overrides or (_: _: {}))
(with nixpkgs.haskell.lib; self: super: {
streamly-shell =
utils.local super "streamly-shell" ./. "" inShell;
streamly = utils.composewell super
"streamly"
"9596aea3ab33d3c2fa513247fcfe8604bd7ff454";
streamly-core = utils.composewellDir super
"streamly"
"9596aea3ab33d3c2fa513247fcfe8604bd7ff454"
"/core";
streamly-process = utils.composewell super
"streamly-process"
"d80b860d9d8ea98e4f7f63390442b3155c34dd08";
});
});
shellDrv = mkHaskellPackages true;
shell = utils.mkShell shellDrv (p: [p.streamly-shell]) true;
in if nixpkgs.lib.inNixShell
then shell
else (mkHaskellPackages false).streamly-shell