-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
54 lines (48 loc) · 1.76 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
# 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.11.tar.gz") { }
, compiler ? "default" }:
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: {
packdiff = utils.local super "packdiff" ./. "" inShell;
streamly =
super.callHackageDirect
{ pkg = "streamly";
ver = "0.9.0";
sha256 = "1ab5n253krgccc66j7ch1lx328b1d8mhkfz4szl913chr9pmbv3q";
} {};
streamly-core =
super.callHackageDirect
{ pkg = "streamly-core";
ver = "0.1.0";
sha256 = "00lfgvicap41rxapzjcml0qxry1lx8501jarhjxrcpxy1plrb146";
} {};
streamly-process = utils.composewell super "streamly-process"
"d80b860d9d8ea98e4f7f63390442b3155c34dd08";
});
});
shellDrv = mkHaskellPackages true;
shell = utils.mkShell shellDrv (p: [ p.packdiff ]) true;
in if nixpkgs.lib.inNixShell then shell else (mkHaskellPackages false).packdiff