-
Notifications
You must be signed in to change notification settings - Fork 144
/
release.nix
64 lines (59 loc) · 2.11 KB
/
release.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
{ reflex-platform-fun ? import ./dep/reflex-platform
, supportedSystems ? ["x86_64-linux" "x86_64-darwin"]
}:
let
native-reflex-platform = reflex-platform-fun {};
inherit (native-reflex-platform.nixpkgs) lib haskell;
tests = system: import ./test { pkgs = (reflex-platform-fun { inherit system; }).nixpkgs; };
perPlatform = lib.genAttrs supportedSystems (system: let
reflex-platform = reflex-platform-fun { inherit system; };
compilers = [
"ghc"
"ghcjs"
] ++ lib.optionals (reflex-platform.androidSupport) [
"ghcAndroidAarch64"
] ++ lib.optionals (reflex-platform.iosSupport) [
"ghcIosAarch64"
];
compilerPkgs = lib.genAttrs compilers (ghc: let
reflex-platform = reflex-platform-fun {
inherit system;
haskellOverlays = [
# Use this package's source for reflex-dom
(self: super: {
_dep = super._dep // {
reflex-dom = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
".git"
"dist"
"dist-newstyle"
]) && !(builtins.elem path [
./CONTRIBUTING.md
./FAQ.md
./Quickref.md
./README.md
./release.nix
./test
])) ./.;
};
reflex-dom-core_disable-use-template-haskell = haskell.lib.disableCabalFlag super.reflex-dom-core "use-template-haskell";
})
];
};
all = tests system // {
inherit (reflex-platform.${ghc})
reflex-dom-core_disable-use-template-haskell
reflex-dom-core
reflex-dom
;
};
in all // {
cache = reflex-platform.pinBuildInputs "reflex-${system}-${ghc}"
(builtins.attrValues all);
});
in compilerPkgs // {
cache = reflex-platform.pinBuildInputs "reflex-${system}"
(map (a: a.cache) (builtins.attrValues compilerPkgs));
});
metaCache = native-reflex-platform.pinBuildInputs "reflex-dom-everywhere"
(map (a: a.cache) (builtins.attrValues perPlatform));
in perPlatform // { inherit metaCache; }