-
-
Notifications
You must be signed in to change notification settings - Fork 139
/
default.nix
59 lines (59 loc) · 1.64 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
with (builtins.fromJSON (builtins.readFile ./nix/nixpkgs.json));
{ haddock ? true
, tests ? false
, examples ? false
, ios ? false
, overlays ? []
, system ? builtins.currentSystem
, crossSystem ? null
, crossOverlays ? []
, allowBroken ? false
, allowUnfree ? true
}:
let
options =
{ inherit
haddock
tests
examples
ios
overlays
system
crossSystem
crossOverlays
allowBroken
allowUnfree;
};
pkgs = import ./nix options;
armPkgs =
with pkgs; with pkgs.lib;
optionalAttrs (options.ios && stdenv.isDarwin)
{ miso-arm = pkgsCross.iphone64.haskell.packages.integer-simple.ghc865.miso; };
release =
with pkgs.haskell.packages.ghc865;
with pkgs.haskell.lib;
sdistTarball (buildStrictly miso);
release-examples =
with pkgs.haskell.packages.ghc865;
with pkgs.haskell.lib;
sdistTarball (buildStrictly miso-examples-jsaddle);
examplePkgs = with pkgs; with pkgs.lib;
let
examplePkgs = optionalAttrs options.examples {
inherit (haskell.packages.ghc865) miso-examples-jsaddle;
inherit (haskell.packages.ghcjs86) miso-examples;
};
in
examplePkgs //
optionalAttrs (stdenv.isDarwin && options.examples && options.ios)
{ inherit (pkgsCross.iphone64.haskell.packages.integer-simple.ghc865) miso-examples-arm;
};
in
{
deploy = pkgs.deploy rev;
inherit pkgs;
miso-ghcjs = pkgs.haskell.packages.ghcjs86.miso;
miso-ghc = pkgs.haskell.packages.ghc865.miso;
inherit (pkgs.haskell.packages.ghc865) miso-jsaddle;
# inherit release release-examples;
} // examplePkgs // armPkgs