-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
37 lines (35 loc) · 1.09 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
{
description = "A minimal example showing how to structure your Haskell application with the ReaderT IO pattern";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
haskellProject = pkgs.haskellPackages.callPackage ./project.nix { };
in
rec {
packages = flake-utils.lib.flattenTree ({ exampleApp = haskellProject; });
defaultPackage = packages.exampleApp;
apps.exampleApp = flake-utils.lib.mkApp { drv = packages.exampleApp; };
defaultApp = apps.exampleApp;
devShell = pkgs.mkShell {
inputsFrom = [ haskellProject.env ];
buildInputs = with pkgs.haskellPackages;
[
# Haskell
ghcid
ormolu
hlint
cabal2nix
haskell-language-server
cabal-install
cabal-fmt
fast-tags
hoogle
];
};
}
);
}