-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
57 lines (52 loc) · 1.53 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
57
{
description = "twesterhout/hdf5-hs: high-level bindings to HDF5";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
nix-filter.url = "github:numtide/nix-filter";
};
outputs = inputs:
let
inherit (inputs.nixpkgs) lib;
haskell-overlay = self: super: {
haskell = super.haskell // {
packageOverrides = lib.composeManyExtensions [
super.haskell.packageOverrides
(hself: hsuper: {
hdf5-hs = hself.callCabal2nix "hdf5-hs" ./. {
hdf5 = super.hdf5;
hdf5_hl = super.hdf5;
};
})
];
};
};
pkgs-for = system: import inputs.nixpkgs {
inherit system;
overlays = [ haskell-overlay ];
};
in
{
overlays.default = haskell-overlay;
packages = inputs.flake-utils.lib.eachDefaultSystemMap (system:
with pkgs-for system; {
inherit haskell;
default = haskellPackages.hdf5-hs;
});
devShells = inputs.flake-utils.lib.eachDefaultSystemMap (system:
{
default = with pkgs-for system; haskellPackages.shellFor {
packages = ps: [ ps.hdf5-hs ];
withHoogle = true;
nativeBuildInputs = with haskellPackages; [
cabal-install
cabal-fmt
fourmolu
haskell-language-server
nil
nixpkgs-fmt
];
};
});
};
}