on develop help sign in
reflex-dom/release.nix
63 lines 2.0 kB history raw
1{ reflex-platform-fun ? import ./dep/reflex-platform
2, supportedSystems ? ["x86_64-linux" "x86_64-darwin"]
3}:
5let
6 native-reflex-platform = reflex-platform-fun {};
7 inherit (native-reflex-platform.nixpkgs) lib;
9 tests = system: import ./test { pkgs = (reflex-platform-fun { inherit system; }).nixpkgs; };
11 perPlatform = lib.genAttrs supportedSystems (system: let
12 reflex-platform = reflex-platform-fun { inherit system; };
13 compilers = [
14 "ghc"
15 "ghcjs"
16 ] ++ lib.optionals (reflex-platform.androidSupport) [
17 "ghcAndroidAarch64"
18 "ghcAndroidAarch32"
19 ] ++ lib.optionals (reflex-platform.iosSupport) [
20 "ghcIosAarch64"
21 ];
22 compilerPkgs = lib.genAttrs compilers (ghc: let
23 reflex-platform = reflex-platform-fun {
24 inherit system;
25 haskellOverlays = [
26 # Use this package's source for reflex
27 (self: super: {
28 _dep = super._dep // {
29 reflex-dom = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
30 ".git"
31 "dist"
32 "dist-newstyle"
33 ]) && !(builtins.elem path [
34 ./CONTRIBUTING.md
35 ./FAQ.md
36 ./Quickref.md
37 ./README.md
38 ./release.nix
39 ./test
40 ])) ./.;
41 };
42 })
43 ];
44 };
45 all = tests system // {
46 inherit (reflex-platform.${ghc})
47 reflex-dom-core
48 reflex-dom
49 ;
50 };
51 in all // {
52 cache = reflex-platform.pinBuildInputs "reflex-${system}-${ghc}"
53 (builtins.attrValues all);
54 });
55 in compilerPkgs // {
56 cache = reflex-platform.pinBuildInputs "reflex-${system}"
57 (map (a: a.cache) (builtins.attrValues compilerPkgs));
58 });
60 metaCache = native-reflex-platform.pinBuildInputs "reflex-dom-everywhere"
61 (map (a: a.cache) (builtins.attrValues perPlatform));
63in perPlatform // { inherit metaCache; }