-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
39 lines (37 loc) · 1.21 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
# https://github.com/jonascarpay/template-haskell/blob/master/flake.nix
{
description = "replace-megaparsec";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = inputs:
let
overlay = final: prev: {
haskell = prev.haskell // {
packageOverrides = hfinal: hprev:
prev.haskell.packageOverrides hfinal hprev // {
replace-megaparsec = hfinal.callCabal2nix "replace-megaparsec" ./. { };
};
};
};
perSystem = system:
let
pkgs = import inputs.nixpkgs { inherit system; overlays = [ overlay ]; };
hspkgs = pkgs.haskellPackages;
# hspkgs = pkgs.haskell.packages.ghc944;
in
{
devShell = hspkgs.shellFor {
withHoogle = true;
packages = p: [ p.replace-megaparsec ];
buildInputs = [
hspkgs.cabal-install
hspkgs.haskell-language-server
# hspkgs.hlint
# hspkgs.ormolu
# pkgs.bashInteractive
];
};
};
in
{ inherit overlay; } // inputs.flake-utils.lib.eachDefaultSystem perSystem;
}