-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdefault.nix
37 lines (33 loc) · 1.14 KB
/
default.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
{ nixpkgsFunc ? import ./nixpkgs
, haskellProfiling ? false
, overlays ? []
}:
let
webghc = import ./webghc.nix { inherit ((nixpkgsFunc {}).buildPackages) fetchgit; };
in (nixpkgsFunc {}).lib.makeExtensible (project: {
nixpkgsArgs = {
overlays = overlays;
# XXX This is required just to build some haskell packages with ghcjs. (ie to build release.nix completely)
config = { allowBroken = true; };
};
nixpkgsCrossArgs = ghcSrc: ghcVersion: {
stdenvStages = import ./cross.nix (nixpkgsFunc {})
[ (import ./cross-overlays-libiconv.nix)
(import ./cross-overlays-haskell.nix ghcSrc ghcVersion haskellProfiling)
];
crossSystem = {
config = "wasm32-unknown-unknown-wasm";
arch = "wasm32";
libc = null;
useLLVM = true;
disableDynamicLinker = true;
thread-model = "single";
# target-cpu = "bleeding-edge";
};
};
nixpkgs = nixpkgsFunc project.nixpkgsArgs;
nixpkgsWasm = nixpkgsFunc (project.nixpkgsArgs //
project.nixpkgsCrossArgs webghc.ghc881Src "8.8.1");
nixpkgsWasm865 = nixpkgsFunc (project.nixpkgsArgs //
project.nixpkgsCrossArgs webghc.ghc865Src "8.6.5");
})