-
Notifications
You must be signed in to change notification settings - Fork 0
/
myhaskell.nix
54 lines (50 loc) · 1.41 KB
/
myhaskell.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
{ self, lib, inputs, ... }:
let
# https://github.com/input-output-hk/haskell.nix/blob/master/ci.nix
compiler-nix-name = "ghc928";
name = "myhaskell";
in
{
perSystem =
{ config
, self'
, inputs'
, pkgs
, system
, ...
}:
let
# inherit (pkgs.stdenv) buildPlatform;
inherit (inputs'.haskell-nix.legacyPackages) haskell-nix;
# A flake-module in nix/flake-modules/haskell.nix defines haskell-nix
# packages once, so we can reuse it here, it's more performant.
project = haskell-nix.cabalProject' {
inherit name compiler-nix-name;
evalSystem = "aarch64-darwin";
src = haskell-nix.cleanSourceHaskell {
inherit name;
src = ./.;
};
};
flake = project.flake {
# Requires remote builder on not linux systems
# crossPlatforms = p: pkgs.lib.optionals (buildPlatform.isLinux) ([ p.musl64 ]);
};
in
# perSytem flake outputs to be consumed by root flake
{
inherit (flake) apps checks packages;
devShells.dev = project.shellFor {
withHoogle = false;
tools = {
cabal = "latest";
hlint = "3.6.1"; # compatible with ghc928
haskell-language-server = "latest";
ghcid = "latest";
fourmolu = "0.14.0.0"; # compatible with ghc928
};
};
};
# General flake output for all systems
flake = { };
}