on jam@fix-docs help sign in
patch/release.nix
39 lines 1.2 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 src = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
22 "release.nix"
23 ".git"
24 "dist"
25 "dist-newstyle"
26 "cabal.haskell-ci"
27 "cabal.project"
28 ".travis.yml"
29 ])) ./.;
30 in reflex-platform.${ghc}.callCabal2nix "patch" src {});
31 in compilerPkgs // {
32 cache = reflex-platform.pinBuildInputs "patch-${system}"
33 (builtins.attrValues compilerPkgs);
34 });
36 metaCache = native-reflex-platform.pinBuildInputs "patch-everywhere"
37 (map (a: a.cache) (builtins.attrValues perPlatform));
39in perPlatform // { inherit metaCache; }