-
Notifications
You must be signed in to change notification settings - Fork 0
/
docs.nix
46 lines (40 loc) · 1.28 KB
/
docs.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
with import ./ortholang/nixpkgs;
let
# working:
# progress-meter = haskell.lib.doJailbreak
# (haskell.lib.overrideCabal haskellPackages.progress-meter (drv: {
# broken = false;
# }));
# working:
# OrthoLang = haskellPackages.callPackage ./ortholang/ortholang.nix {
# inherit progress-meter;
# };
# working:
OrthoLang = import ./ortholang;
# not working:
# docs2 = haskellPackages.callPackage ./docs2.nix { inherit progress-meter OrthoLang; };
# docs = haskell.lib.addBuildDepends docs2
# (with haskellPackages; [
# zlib
# zlib.dev
# zlib.out
# pkgconfig
# ]);
noBigDotfiles = path: type: baseNameOf path != ".stack-work"
&& baseNameOf path != ".git";
myGHC = pkgs.haskell.packages.ghc865;
logging = myGHC.callPackage (import ./ortholang/logging) {};
progress-meter = haskell.lib.overrideCabal pkgs.haskellPackages.progress-meter (_: {
broken = false;
jailbreak = true;
});
haskellPkg = myGHC.callPackage ./docs-generated.nix {
inherit logging progress-meter OrthoLang;
};
docs = haskell.lib.overrideCabal haskellPkg (drv: {
src = builtins.filterSource noBigDotfiles ./.;
buildDepends = (drv.buildDepends or []) ++ [
zlib.dev zlib.out pkgconfig
];
});
in docs