-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathrelease.nix
38 lines (33 loc) · 1.13 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
{ reflex-platform-fun ? import ./dep/reflex-platform
}:
let
native-reflex-platform = reflex-platform-fun {};
inherit (native-reflex-platform.nixpkgs) lib;
systems = [ "x86_64-linux" "x86_64-darwin" ];
perPlatform = lib.genAttrs systems (system: let
reflex-platform = reflex-platform-fun { inherit system; };
compilers = [
"ghc"
"ghcjs"
] ++ lib.optionals (reflex-platform.androidSupport) [
"ghcAndroidAarch64"
"ghcAndroidAarch32"
] ++ lib.optionals (reflex-platform.iosSupport) [
"ghcIosAarch64"
];
hsPkgs = lib.genAttrs compilers (ghc: let
ghc' = reflex-platform.${ghc}.override {
overrides = self: super: {
reflex-todomvc = self.callPackage ./. { };
};
};
in {
inherit (ghc') reflex-todomvc;
});
in hsPkgs // {
cache = reflex-platform.pinBuildInputs "reflex-${system}"
(lib.concatLists (map builtins.attrValues (builtins.attrValues hsPkgs)));
});
metaCache = native-reflex-platform.pinBuildInputs "reflex-everywhere"
(map (a: a.cache) (builtins.attrValues perPlatform));
in perPlatform // { inherit metaCache; }