-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
48 lines (47 loc) · 1.27 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
{
description = "algebra-simple flake";
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.nix-hs-utils.url = "github:tbidne/nix-hs-utils";
outputs =
inputs@{
flake-parts,
nix-hs-utils,
nixpkgs,
self,
}:
flake-parts.lib.mkFlake { inherit inputs; } {
perSystem =
{ pkgs, ... }:
let
ghc-version = "ghc982";
compiler = pkgs.haskell.packages."${ghc-version}";
hlib = pkgs.haskell.lib;
mkPkg =
returnShellEnv:
nix-hs-utils.mkHaskellPkg {
inherit compiler pkgs returnShellEnv;
name = "algebra-simple";
root = ./.;
};
compilerPkgs = {
inherit compiler pkgs;
};
in
{
packages.default = mkPkg false;
devShells.default = mkPkg true;
apps = {
format = nix-hs-utils.format compilerPkgs;
lint = nix-hs-utils.lint compilerPkgs;
lintRefactor = nix-hs-utils.lintRefactor compilerPkgs;
};
};
systems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
};
}