on develop help sign in
patch/release.nix
49 lines 1.5 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 patch = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
28 "release.nix"
29 ".git"
30 "dist"
31 "dist-newstyle"
32 "cabal.haskell-ci"
33 "cabal.project"
34 ".travis.yml"
35 ])) ./.;
36 };
37 })
38 ];
39 };
40 in reflex-platform.${ghc}.patch);
41 in compilerPkgs // {
42 cache = reflex-platform.pinBuildInputs "patch-${system}"
43 (builtins.attrValues compilerPkgs);
44 });
46 metaCache = native-reflex-platform.pinBuildInputs "patch-everywhere"
47 (map (a: a.cache) (builtins.attrValues perPlatform));
49in perPlatform // { inherit metaCache; }