@@ -3,57 +3,51 @@ haskellPackages: let
3 inherit (pkgs) stdenv;
3 inherit (pkgs) stdenv;
4 haskellLib = pkgs.haskell.lib;
4 haskellLib = pkgs.haskell.lib;
6− reflex-dom-core = haskellPackages.callPackage
6+ reflex-dom-core = let
7− ({ temporary, jsaddle-warp, process, chrome-test-utils
8− , selenium-server-standalone, which, fontconfig, chromium, pkgs
10− inherit (haskellPackages) ghc;
7+ inherit (haskellPackages) ghc;
11− noGcTest = stdenv.hostPlatform.system != "x86_64-linux"
8+ noGcTest = stdenv.hostPlatform.system != "x86_64-linux"
12− || stdenv.hostPlatform != stdenv.buildPlatform
9+ || stdenv.hostPlatform != stdenv.buildPlatform
13− || (ghc.isGhcjs or false);
10+ || (ghc.isGhcjs or false);
14− in haskellLib.overrideCabal
11+ in haskellLib.overrideCabal
15− (haskellPackages.callCabal2nix "reflex-dom-core" ./reflex-dom-core { })
12+ (haskellPackages.callCabal2nix "reflex-dom-core" ./reflex-dom-core { })
17− #TODO: Get hlint working for cross-compilation
14+ #TODO: Get hlint working for cross-compilation
18− doCheck = stdenv.hostPlatform == stdenv.buildPlatform && !(ghc.isGhcjs or false);
15+ doCheck = stdenv.hostPlatform == stdenv.buildPlatform && !(ghc.isGhcjs or false);
20− # The headless browser run as part of the tests will exit without this
17+ # The headless browser run as part of the tests will exit without this
21− preBuild = ''
18+ preBuild = ''
22− export HOME="$PWD"
19+ export HOME="$PWD"
25− # Show some output while running tests, so we might notice what's wrong
22+ # Show some output while running tests, so we might notice what's wrong
26− testTarget = "--show-details=streaming";
23+ testTarget = "--show-details=streaming";
28− testHaskellDepends = (drv.testHaskellDepends or []) ++ stdenv.lib.optionals (!noGcTest) [
25+ testHaskellDepends = with haskellPackages; (drv.testHaskellDepends or []) ++ stdenv.lib.optionals (!noGcTest) [
29− temporary
26+ temporary
30− jsaddle-warp
27+ jsaddle-warp
32− chrome-test-utils
29+ chrome-test-utils
35− testSystemDepends = (drv.testSystemDepends or []) ++ [
32+ testSystemDepends = with pkgs; (drv.testSystemDepends or []) ++ [
36− selenium-server-standalone which
33+ selenium-server-standalone which
37− ] ++ stdenv.lib.optionals (!noGcTest) [
34+ ] ++ stdenv.lib.optionals (!noGcTest) [
39− pkgs.iproute
36+ pkgs.iproute
41− } // stdenv.lib.optionalAttrs (!noGcTest) {
38+ } // stdenv.lib.optionalAttrs (!noGcTest) {
42− # The headless browser run as part of gc tests would hang/crash without this
39+ # The headless browser run as part of gc tests would hang/crash without this
43− preCheck = ''
40+ preCheck = ''
44− export FONTCONFIG_PATH=${fontconfig.out}/etc/fonts
41+ export FONTCONFIG_PATH=${pkgs.fontconfig.out}/etc/fonts
48− reflex-dom = haskellPackages.callPackage
49− ({ android-activity }: haskellLib.overrideCabal
44+ reflex-dom = haskellLib.overrideCabal
50− (haskellPackages.callCabal2nix "reflex-dom" ./reflex-dom { })
45+ (haskellPackages.callCabal2nix "reflex-dom" ./reflex-dom { })
52− # Hack until https://github.com/NixOS/cabal2nix/pull/432 lands
47+ # Hack until https://github.com/NixOS/cabal2nix/pull/432 lands
53− libraryHaskellDepends = (drv.libraryHaskellDepends or []) ++ stdenv.lib.optionals (with stdenv.hostPlatform; isAndroid && is32bit) [
48+ libraryHaskellDepends = (drv.libraryHaskellDepends or []) ++ stdenv.lib.optionals (with stdenv.hostPlatform; isAndroid && is32bit) [
54− android-activity
49+ haskellPackages.android-activity
58 chrome-test-utils = haskellPackages.callCabal2nix "chrome-test-utils" ./chrome-test-utils {};
52 chrome-test-utils = haskellPackages.callCabal2nix "chrome-test-utils" ./chrome-test-utils {};