|
1 |
| -{ reflex-platform-fun ? import ./dep/reflex-platform |
2 |
| -}: |
| 1 | +{ pkgs ? import <nixpkgs> {} }: |
3 | 2 |
|
4 |
| -let |
5 |
| - native-reflex-platform = reflex-platform-fun { __useNewerCompiler = true; }; |
6 |
| - inherit (native-reflex-platform.nixpkgs) lib; |
7 |
| - systems = ["x86_64-linux"]; |
| 3 | +let reflex-platform-release = import ./nix/release/reflex-platform.nix {}; |
| 4 | + haskell-nix-release = import ./nix/release/haskell.nix {}; |
8 | 5 |
|
9 |
| - perPlatform = lib.genAttrs systems (system: let |
10 |
| - reflex-platform = reflex-platform-fun { inherit system; __useNewerCompiler = true; }; |
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 |
| - nixpkgsGhcs = |
21 |
| - let |
22 |
| - pkgs = import ./nixpkgs { inherit system; }; |
23 |
| - nixGhc945 = pkgs.haskell.packages.ghc945.override { |
24 |
| - }; |
25 |
| - nixGhc961 = pkgs.haskell.packages.ghc961.override { |
26 |
| - }; |
27 |
| - in |
28 |
| - { |
29 |
| - ghc945 = nixGhc945.callCabal2nix "patch" (import ./src.nix) {}; |
30 |
| - ghc961 = nixGhc961.callCabal2nix "patch" (import ./src.nix) {}; |
31 |
| - }; |
32 |
| - compilerPkgs = lib.genAttrs compilers (ghc: let |
33 |
| - reflex-platform = reflex-platform-fun { |
34 |
| - inherit system; |
35 |
| - __useNewerCompiler = true; |
36 |
| - haskellOverlays = [ |
37 |
| - # Use this package's source for reflex |
38 |
| - (self: super: { |
39 |
| - _dep = super._dep // { |
40 |
| - patch = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [ |
41 |
| - "release.nix" |
42 |
| - ".git" |
43 |
| - "dist" |
44 |
| - "dist-newstyle" |
45 |
| - "cabal.haskell-ci" |
46 |
| - "cabal.project" |
47 |
| - ".travis.yml" |
48 |
| - ])) ./.; |
49 |
| - }; |
50 |
| - }) |
51 |
| - ]; |
52 |
| - }; |
53 |
| - in reflex-platform.${ghc}.patch); |
54 |
| - in compilerPkgs // nixpkgsGhcs // { |
55 |
| - cache = reflex-platform.pinBuildInputs "patch-${system}" |
56 |
| - (builtins.attrValues compilerPkgs); |
57 |
| - }); |
| 6 | +in pkgs.runCommand "release" {} '' |
| 7 | + mkdir -p $out |
58 | 8 |
|
59 |
| - metaCache = native-reflex-platform.pinBuildInputs "patch-everywhere" |
60 |
| - (map (a: a.cache) (builtins.attrValues perPlatform)); |
61 |
| - |
62 |
| -in perPlatform // { inherit metaCache; } |
| 9 | + ln -s ${reflex-platform-release.metaCache} $out/reflex-platform |
| 10 | + ln -s ${haskell-nix-release} $out/haskell-nix |
| 11 | +'' |
0 commit comments