-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
67 lines (54 loc) · 1.75 KB
/
flake.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
59
60
61
62
63
64
65
66
67
{ inputs.all-cabal-hashes = {
url = "github:commercialhaskell/all-cabal-hashes/hackage";
flake = false;
};
outputs = { all-cabal-hashes, flake-utils, nixpkgs, self }:
flake-utils.lib.eachDefaultSystem (system:
let
config.allowUnfree = true;
pkgs = import nixpkgs {
inherit config system;
overlays = [ self.overlays.default ];
};
in
{ packages.default = pkgs.haskellPackagesCustom.openai-servant;
devShells.default = pkgs.haskellPackagesCustom.shellFor {
packages = hpkgs: [
(pkgs.haskell.lib.doCheck hpkgs.openai-servant)
];
nativeBuildInputs = [
pkgs.haskell-language-server
(pkgs.vscode-with-extensions.override {
vscodeExtensions = [
pkgs.vscode-extensions.haskell.haskell
pkgs.vscode-extensions.justusadam.language-haskell
];
})
];
withHoogle = true;
doBenchmark = true;
};
}
) // {
overlays.default = self: super: {
inherit all-cabal-hashes;
haskellPackagesCustom = self.haskellPackages.override (old: {
overrides =
let
hlib = self.haskell.lib.compose;
in
self.lib.composeManyExtensions [
(hlib.packageSourceOverrides {
openai-servant = ./.;
})
(hlib.packagesFromDirectory {
directory = ./dependencies;
})
(hself: hsuper: {
openai-servant = hlib.dontCheck hsuper.openai-servant;
})
];
});
};
};
}