-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
71 lines (69 loc) · 1.83 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
{
description = "Weeder Nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-23.11";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
};
outputs = { self, nixpkgs, pre-commit-hooks }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [
(import ./nix/overlay.nix)
];
};
in
with pkgs.lib;
{
overlays.${system} = import ./nix/overlay.nix;
lib.${system} = pkgs.weeder-nix;
checks.${system} = {
validity = self.lib.${system}.makeWeederCheck {
name = "validity";
reportOnly = true;
packages = [
"validity"
# "genvalidity"
];
};
yesod = self.lib.${system}.makeWeederCheck {
name = "yesod-weeder";
reportOnly = true;
packages = [
"yesod"
"yesod-auth"
"yesod-auth-oauth"
"yesod-bin"
"yesod-core"
"yesod-eventsource"
"yesod-form"
"yesod-form-multi"
"yesod-newsfeed"
"yesod-persistent"
"yesod-sitemap"
"yesod-static"
"yesod-test"
"yesod-websockets"
];
};
pre-commit = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixpkgs-fmt.enable = true;
deadnix.enable = true;
tagref.enable = true;
};
};
};
devShells.${system}.default = pkgs.mkShell {
name = "weeder-nix-shell";
buildInputs = with pre-commit-hooks.packages.${system}; [
pkgs.haskellPackages.weeder
nixpkgs-fmt
statix
];
shellHook = self.checks.${system}.pre-commit.shellHook;
};
};
}