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