-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
56 lines (49 loc) · 1.45 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flakeParts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ self, nixpkgs, flakeParts, ... }:
flakeParts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [
inputs.haskell-flake.flakeModule
inputs.treefmt-nix.flakeModule
];
perSystem = { self', pkgs, ... }: {
haskellProjects.default = {
projectFlakeName = "gltf-loader";
settings = {
gltf-codec = {
broken = false;
check = false;
};
};
devShell = {
enable = true;
tools = hsPkgs: {
cabal-install = hsPkgs.cabal-install;
fourmolu = hsPkgs.fourmolu;
haskell-language-server = hsPkgs.haskell-language-server;
nixpkgs-fmt = pkgs.nixpkgs-fmt;
hlint = hsPkgs.hlint;
};
};
};
treefmt.config = {
projectRootFile = "flake.nix";
programs = {
nixpkgs-fmt.enable = true;
fourmolu.enable = true;
hlint.enable = true;
};
};
packages.default = self'.packages.gltf-loader;
};
};
}