-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
37 lines (32 loc) · 1.01 KB
/
flake.nix
File metadata and controls
37 lines (32 loc) · 1.01 KB
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/nixos-22.11";
devenv.url = "github:cachix/devenv";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ inputs.devenv.flakeModule ];
systems = [ "x86_64-linux" ];
perSystem = { config, self', inputs', pkgs, system, ... }:
let haskellPkgs = pkgs.haskell.packages.ghc943;
in {
packages.default = haskellPkgs.callPackage ./default.nix { };
devShells.default = pkgs.mkShell {
inputsFrom =
[ self'.packages.default.env self'.devShells.devenv-shell ];
};
devenv.shells.devenv-shell = {
packages = with haskellPkgs; [
alex
cabal-install
happy
haskell-language-server
];
pre-commit.hooks = { cabal2nix.enable = true; };
enterShell = ''
echo hello devenv shell
'';
};
};
};
}