forked from reflex-frp/reflex-dom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.nix
81 lines (76 loc) · 2.77 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{ 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 = [
(self: super: {
commutative-semigroups = self.callHackageDirect {
pkg = "commutative-semigroups";
ver = "0.1.0.0";
sha256 = "0xmv20n3iqjc64xi3c91bwqrg8x79sgipmflmk21zz4rj9jdkv8i";
} {};
reflex = self.callHackageDirect {
pkg = "reflex";
ver = "0.9.0.1";
sha256 = "sha256-HhBBElxwfzGt1tOMCtYLT9Ody9mvaDb2ppuy3qFWLPs=";
} {};
patch = self.callHackageDirect {
pkg = "patch";
ver = "0.0.8.2";
sha256 = "sha256-7+dwuBNo33XPsBo5DhFD4oyKBWrOvTHUyA6RJyHGH5g=";
} {};
})
# Use this package's source for reflex
(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; }