generated from srid/ema-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
49 lines (48 loc) · 1.64 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
{
description = "timedot-invoice";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
# Haskell overrides
ema.url = "github:EmaApps/ema";
ema.flake = false;
heist.url = "github:snapframework/heist"; # Waiting for 1.1.1.0 on nixpkgs cabal hashes
heist.flake = false;
heist-extra.url = "github:srid/heist-extra";
heist-extra.flake = false;
};
outputs = inputs@{ self, nixpkgs, flake-parts, haskell-flake, ... }:
flake-parts.lib.mkFlake { inherit self; } {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [
haskell-flake.flakeModule
];
perSystem = { self', config, inputs', pkgs, ... }: {
# "haskellProjects" comes from https://github.com/srid/haskell-flake
haskellProjects.default = {
packages.timedot-invoice.root = ./.;
buildTools = hp: {
inherit (pkgs)
treefmt
nixpkgs-fmt
foreman;
inherit (hp)
cabal-fmt
fourmolu;
};
source-overrides = {
inherit (inputs) heist heist-extra;
ema = inputs.ema + /ema;
ema-generics = inputs.ema + /ema-generics;
ema-extra = inputs.ema + /ema-extra;
};
overrides = self: super: with pkgs.haskell.lib; {
ema-generics = dontCheck super.ema-generics;
heist = dontCheck super.heist; # Tests are broken.
};
};
packages.default = config.packages.timedot-invoice;
};
};
}