generated from jezen/yesod-subsite-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
59 lines (56 loc) · 1.71 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-23.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
self.overlays.default
];
};
hl = pkgs.haskell.lib;
in
{
packages.loss-run-events = pkgs.haskellPackages.loss-run-events;
packages.default = pkgs.lib.trivial.pipe pkgs.haskellPackages.loss-run-events
[
hl.dontHaddock
hl.enableStaticLibraries
hl.justStaticExecutables
hl.disableLibraryProfiling
hl.disableExecutableProfiling
];
checks = {
inherit (pkgs.haskellPackages) loss-run-events;
};
devShells.default = pkgs.haskellPackages.shellFor {
packages = p: [ p.loss-run-events ];
buildInputs = with pkgs.haskellPackages; [
cabal-fmt
cabal-install
hlint
];
};
}) // {
overlays.default = _: prev: {
haskell = prev.haskell // {
# override for all compilers
packageOverrides = prev.lib.composeExtensions prev.haskell.packageOverrides (_: hprev: {
loss-run-events =
let
haskellSourceFilter = prev.lib.sourceFilesBySuffices ./. [
".cabal"
".hs"
];
in
hprev.callCabal2nix "loss-run-events" haskellSourceFilter { };
});
};
};
};
}