-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
81 lines (77 loc) · 2.06 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
{
description = "weiss-xmonad";
inputs = {
haskellNix.url = "github:input-output-hk/haskell.nix";
nixpkgs.follows = "haskellNix/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
devshell.url = "github:numtide/devshell";
};
nixConfig = {
extra-substituters = [ "https://cache.iog.io" ];
extra-trusted-public-keys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
};
outputs =
inputs@{
self,
flake-utils,
haskellNix,
devshell,
nixpkgs,
...
}:
flake-utils.lib.eachSystem
[
"x86_64-linux"
"x86_64-darwin"
]
(
system:
let
overlays = [
haskellNix.overlay
(final: prev: {
xmonad = final.xmonad_0_18_0;
weiss-xmonad = final.haskell-nix.project' {
src = ./.;
compiler-nix-name = "ghc966";
};
})
devshell.overlays.default
];
pkgs = import nixpkgs {
inherit system overlays;
inherit (haskellNix) config;
};
flake = pkgs.weiss-xmonad.flake { };
shellWithToml =
tomls:
pkgs.weiss-xmonad.shellFor {
exactDeps = false;
withHoogle = true;
inputsFrom = [
(pkgs.devshell.fromTOML ./devshell.toml)
# (pkgs.devshell.mkShell {
# name = "weiss-xmonad";
# packages = with pkgs; [ ];
# })
];
tools = {
cabal = "latest";
fourmolu = "latest";
hlint = "latest";
cabal-fmt = "latest";
haskell-language-server = "latest";
};
};
in
flake
// {
packages = {
default = flake.packages."weiss-xmonad:exe:weiss-xmonad-exe";
};
devShells = {
default = shellWithToml [ ];
};
}
);
}