-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
82 lines (81 loc) · 2.85 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
description = "di";
inputs = {
flakety.url = "github:k0001/flakety";
nixpkgs.follows = "flakety/nixpkgs";
flake-parts.follows = "flakety/flake-parts";
};
outputs = inputs@{ ... }:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
flake.overlays.default = inputs.nixpkgs.lib.composeManyExtensions [
inputs.flakety.overlays.default
(final: prev:
let
hsLib = prev.haskell.lib;
hsClean = drv:
hsLib.overrideCabal drv
(old: { src = prev.lib.sources.cleanSource old.src; });
in {
haskell = prev.haskell // {
packageOverrides = prev.lib.composeExtensions
(prev.haskell.packageOverrides or (_: _: { })) (hself: hsuper: {
df1 = hsClean (hself.callPackage ./df1 { });
df1-html = hsClean (hself.callPackage ./df1-html { });
df1-wai = hsClean (hself.callPackage ./df1-wai { });
di = hsClean (hself.callPackage ./di { });
di-core = hsClean (hself.callPackage ./di-core { });
di-df1 = hsClean (hself.callPackage ./di-df1 { });
di-handle = hsClean (hself.callPackage ./di-handle { });
di-monad = hsClean (hself.callPackage ./di-monad { });
di-wai = hsClean (hself.callPackage ./di-wai { });
});
};
})
];
systems = [ "x86_64-linux" ];
perSystem = { config, pkgs, system, ... }: {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ inputs.self.overlays.default ];
};
packages = {
default = pkgs.releaseTools.aggregate {
name = "every output from this flake";
constituents = [
config.packages.df1
config.packages.df1-html
config.packages.df1-wai
config.packages.di
config.packages.di-core
config.packages.di-df1
config.packages.di-handle
config.packages.di-monad
config.packages.di-wai
config.devShells.ghc
];
};
inherit (pkgs.haskell.packages.ghc98)
df1 df1-html df1-wai di di-core di-df1 di-handle di-monad di-wai;
};
devShells = {
default = config.devShells.ghc;
ghc = pkgs.haskell.packages.ghc98.shellFor {
packages = p: [
p.df1
p.df1-html
p.df1-wai
p.di
p.di-core
p.di-df1
p.di-handle
p.di-monad
p.di-wai
];
withHoogle = true;
nativeBuildInputs =
[ pkgs.cabal-install pkgs.cabal2nix pkgs.ghcid ];
};
};
};
};
}