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
{
description = "composite-lens-extra";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
lint-utils.url = "git+https://gitlab.homotopic.tech/nix/lint-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
haskellNix.url = "github:input-output-hk/haskell.nix";
};
outputs = { self, nixpkgs, flake-utils, lint-utils, haskellNix }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
deferPluginErrors = true;
overlays = [
haskellNix.overlay
(final: prev: {
composite-lens-extra =
final.haskell-nix.project' {
src = ./.;
compiler-nix-name = "ghc922";
projectFileName = "stack.yaml";
modules = [{
reinstallableLibGhc = true;
}];
shell.buildInputs = [
pkgs.haskellPackages.hpack-dhall
];
};
})
];
pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
flake = pkgs.composite-lens-extra.flake { };
in
flake // {
defaultPackage = flake.packages."composite-lens-extra:lib:composite-lens-extra";
checks = flake.checks // {
hlint = lint-utils.outputs.linters.${system}.hlint ./.;
hpack = lint-utils.outputs.linters.${system}.hpack ./.;
nixpkgs-fmt = lint-utils.outputs.linters.${system}.nixpkgs-fmt ./.;
stylish-haskell = lint-utils.outputs.linters.${system}.stylish-haskell ./.;
};
});
}