on develop help sign in
Merge pull request #345 from reflex-frp/je-rp-ci

Lean on reflex-platform for CI more

commita579bf7c1cb9a2cf3e844873b664102f2ce327ef authorJohn Ericson <John.Ericson@Obsidian.Systems> dateThu 12 Dec 2019, 13:11 (7 years ago) parent5dc1f855e85ec1
3 files changed+38−64
default.nix−53 dep/reflex-platform/github.json+2−2 release.nix+36−9
default.nixdeleted−53
@@ -1,53 +0,0 @@
1−haskellPackages: let
2− pkgs = haskellPackages.callPackage ({ pkgs }: pkgs) {};
3− inherit (pkgs) stdenv;
4− haskellLib = pkgs.haskell.lib;
5−in {
6− reflex-dom-core = let
7− inherit (haskellPackages) ghc;
8− noGcTest = stdenv.hostPlatform.system != "x86_64-linux"
9− || stdenv.hostPlatform != stdenv.buildPlatform
10− || (ghc.isGhcjs or false);
11− in haskellLib.overrideCabal
12− (haskellPackages.callCabal2nix "reflex-dom-core" ./reflex-dom-core { })
13− (drv: {
14− #TODO: Get hlint working for cross-compilation
15− doCheck = stdenv.hostPlatform == stdenv.buildPlatform && !(ghc.isGhcjs or false);
16−
17− # The headless browser run as part of the tests will exit without this
18− preBuild = ''
19− export HOME="$PWD"
20− '';
21−
22− # Show some output while running tests, so we might notice what's wrong
23− testTarget = "--show-details=streaming";
24−
25− testHaskellDepends = with haskellPackages; (drv.testHaskellDepends or []) ++ stdenv.lib.optionals (!noGcTest) [
26− temporary
27− jsaddle-warp
28− process
29− chrome-test-utils
30− ];
31−
32− testSystemDepends = with pkgs; (drv.testSystemDepends or []) ++ [
33− selenium-server-standalone which
34− ] ++ stdenv.lib.optionals (!noGcTest) [
35− chromium
36− pkgs.iproute
37− ];
38− } // stdenv.lib.optionalAttrs (!noGcTest) {
39− # The headless browser run as part of gc tests would hang/crash without this
40− preCheck = ''
41− export FONTCONFIG_PATH=${pkgs.fontconfig.out}/etc/fonts
42− '';
43− });
44− reflex-dom = haskellLib.overrideCabal
45− (haskellPackages.callCabal2nix "reflex-dom" ./reflex-dom { })
46− (drv: {
47− # Hack until https://github.com/NixOS/cabal2nix/pull/432 lands
48− libraryHaskellDepends = (drv.libraryHaskellDepends or []) ++ stdenv.lib.optionals (with stdenv.hostPlatform; isAndroid && is32bit) [
49− haskellPackages.android-activity
50− ];
51− });
52− chrome-test-utils = haskellPackages.callCabal2nix "chrome-test-utils" ./chrome-test-utils {};
53−}
dep/reflex-platform/github.json+2−2
@@ -2,6 +2,6 @@
22 "owner": "reflex-frp",
33 "repo": "reflex-platform",
44 "branch": "develop",
5− "rev": "338fc907e37d70e6469c529456f33221fb05ca1f",
6− "sha256": "08gfhpp0pkvvi1wnlpcn6wmpzdjvy5z7dy1h66gp2w8b5cx8hx5h"
5+ "rev": "e7b76dd552a10916c7d8702c11292dac4f4299ea",
6+ "sha256": "0s1183arrwldcs50qhzgnv94v24n9bgq6dfq64wp0a3q2nzyvgwh"
77}
release.nix+36−9
@@ -17,16 +17,43 @@ let
1717 ] ++ lib.optionals (reflex-platform.iosSupport) [
1818 "ghcIosAarch64"
1919 ];
20− hsPkgs = lib.genAttrs compilers (ghc: let
21− ghc' = reflex-platform.${ghc}.override {
22− overrides = self: super: import ./. self;
23− };
24− in {
25− inherit (ghc') reflex-dom reflex-dom-core;
20+ variations = map (v: "reflex-dom" + v) [
21+ ""
22+ ];
23+ compilerPkgs = lib.genAttrs compilers (ghc: let
24+ variationPkgs = lib.genAttrs variations (variation: let
25+ reflex-platform = reflex-platform-fun {
26+ inherit system;
27+ haskellOverlays = [
28+ # Use this package's source for reflex
29+ (self: super: {
30+ _dep = super._dep // {
31+ reflex-dom = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
32+ "release.nix"
33+ ".git"
34+ "dist"
35+ ])) ./.;
36+ };
37+ })
38+ ];
39+ };
40+ all = {
41+ inherit (reflex-platform.${ghc})
42+ reflex-dom-core
43+ reflex-dom
44+ ;
45+ };
46+ in all // {
47+ cache = reflex-platform.pinBuildInputs "reflex-${system}-${ghc}-${variation}"
48+ (builtins.attrValues all);
49+ });
50+ in variationPkgs // {
51+ cache = reflex-platform.pinBuildInputs "reflex-${system}-${ghc}"
52+ (map (a: a.cache) (builtins.attrValues variationPkgs));
2653 });
27− in hsPkgs // {
28− cache = reflex-platform.pinBuildInputs "reflex-dom-${system}"
29− (lib.concatLists (map builtins.attrValues (builtins.attrValues hsPkgs)));
54+ in compilerPkgs // {
55+ cache = reflex-platform.pinBuildInputs "reflex-${system}"
56+ (map (a: a.cache) (builtins.attrValues compilerPkgs));
3057 });
3158
3259 metaCache = native-reflex-platform.pinBuildInputs "reflex-dom-everywhere"