summaryrefslogtreecommitdiff
path: root/flake.nix
blob: 33c31496d9126b9af93241e1cb9af205aa00960b (plain) (blame)
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
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
    flake-parts.url = "github:hercules-ci/flake-parts";
    haskell-flake.url = "github:srid/haskell-flake"; # https://community.flake.parts/haskell-flake
  };
  outputs = inputs @ {
    self,
    nixpkgs,
    flake-parts,
    ...
  }:
    flake-parts.lib.mkFlake {inherit inputs;} {
      systems = nixpkgs.lib.systems.flakeExposed;
      imports = [inputs.haskell-flake.flakeModule];

      perSystem = {
        self',
        pkgs,
        ...
      }: {
        haskellProjects.default = {
          devShell = {
            enable = true;
            tools = hp: {inherit (hp) hakyll;};
            hlsCheck.enable = true;
            mkShellArgs = {
              buildInputs = [pkgs.just];
              shellHook = "just -l -u";
            };
          };
        };

        packages.default = self'.packages.skiletro; # haskell-flake doesn't set the default package, but you can do it here.
      };
    };
}