-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
72 lines (67 loc) · 2.42 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
inputs = {
nixpkgs.url = github:NixOS/nixpkgs;
flake-utils.url = github:numtide/flake-utils;
generic-override = {
url = github:estatico/generic-override;
flake = false;
};
hexquote = {
url = github:Philonous/hexquote;
flake = false;
};
type-level-sets = {
url = github:dorchard/type-level-sets;
flake = false;
};
relude = {
url = github:kowainik/relude;
flake = false;
};
vinyl = {
url = github:VinylRecords/Vinyl;
flake = false;
};
singletons = {
url = github:goldfirere/singletons;
flake = false;
};
};
outputs = inputs@{self, ...}: inputs.flake-utils.lib.eachDefaultSystem (system: let
inherit (inputs.nixpkgs) lib;
pkgs = import "${inputs.nixpkgs}/pkgs/top-level" {
localSystem = { inherit system; };
overlays = [
(final: prev: {
"libusb-1.0" = prev.libusb1;
})
(final: prev: {
haskell = prev.haskell // {
packageOverrides = hfinal: hprev: {
generic-override = hfinal.callCabal2nixWithOptions "generic-override" "${inputs.generic-override}" "--subpath generic-override" {};
hexquote = hfinal.callCabal2nix "hexquote" "${inputs.hexquote}" {};
type-level-sets = hfinal.callCabal2nix "type-level-sets" "${inputs.type-level-sets}" {};
vinyl = hfinal.callCabal2nix "vinyl" "${inputs.vinyl}" {};
bindings-libusb = hprev.bindings-libusb.override { libusb = final.libusb1; };
relude = hfinal.callCabal2nixWithOptions "relude" "${inputs.relude}" "--jailbreak" {};
system-fileio = final.haskell.lib.dontCheck hprev.system-fileio;
singletons = hfinal.callCabal2nixWithOptions "singletons" "${inputs.singletons}" "--subpath singletons" {};
singletons-th = hfinal.callCabal2nixWithOptions "singletons-th" "${inputs.singletons}" "--subpath singletons-th" {};
singletons-base = hfinal.callCabal2nixWithOptions "singletons-base" "${inputs.singletons}" "--subpath singletons-base" {};
};
};
})
];
config = {
allowBroken = true;
};
};
ghcVersion = "924";
dymopipe = pkgs.haskell.packages."ghc${ghcVersion}".callCabal2nix "dymopipe" "${self}" {};
in {
packages = {
inherit dymopipe;
};
defaultPackage = self.packages.${system}.dymopipe;
});
}