on v0.0.0.0 help sign in
patch/release.nix
38 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 "cabal.haskell-ci"
26 "cabal.project"
27 ".travis.yml"
28 ])) ./.;
29 in reflex-platform.${ghc}.callCabal2nix "patch" src {});
30 in compilerPkgs // {
31 cache = reflex-platform.pinBuildInputs "patch-${system}"
32 (builtins.attrValues compilerPkgs);
33 });
35 metaCache = native-reflex-platform.pinBuildInputs "patch-everywhere"
36 (map (a: a.cache) (builtins.attrValues perPlatform));
38in perPlatform // { inherit metaCache; }