Skip to content

Commit

Permalink
More Android improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Trinkle committed Sep 26, 2017
1 parent e35055f commit 915c308
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ let all-cabal-hashes = fetchFromGitHub {
shims = if builtins.pathExists ./shims/github.json then fetchFromGitHub (builtins.fromJSON (builtins.readFile ./shims/github.json)) else filterGit ./shims;
ghcjs = if builtins.pathExists ./ghcjs/github.json then fetchFromGitHub (builtins.fromJSON (builtins.readFile ./ghcjs/github.json)) else filterGit ./ghcjs;
};
inherit (nixpkgs.stdenv.lib) optionals;
inherit (nixpkgs.stdenv.lib) optional optionals;
in with lib;
let overrideCabal = pkg: f: if pkg == null then null else lib.overrideCabal pkg f;
exposeAeson = aeson: overrideCabal aeson (drv: {
Expand Down Expand Up @@ -813,6 +813,7 @@ in let this = rec {
androidDevTools = [
ghc.haven
nixpkgs.maven
nixpkgs.androidsdk
];

# Tools that are useful for development under both ghc and ghcjs
Expand Down Expand Up @@ -873,7 +874,10 @@ in let this = rec {
ghcWithStuff = if platform == "ghc" || platform == "ghcjs" then haskellPackages.ghcWithHoogle else haskellPackages.ghcWithPackages;
in ghcWithStuff (p: import ./packages.nix { haskellPackages = p; inherit platform; });

tryReflexPackages = generalDevTools ghc ++ builtins.map reflexEnv platforms;
tryReflexPackages = generalDevTools ghc
++ builtins.map reflexEnv platforms
++ optional (system == "x86_64-darwin") iosReflexTodomvc
++ optional (system != "x86_64-darwin") androidReflexTodomvc;

demoVM = (import "${nixpkgs.path}/nixos" {
configuration = {
Expand Down
3 changes: 2 additions & 1 deletion packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ with haskellPackages;
##############################################################################
reflex
reflex-dom
reflex-todomvc

] ++ (if platform == "ghcjs" then [
##############################################################################
# Add ghcjs-only packages here #
##############################################################################
reflex-todomvc

] else []) ++ (if platform == "ghc" then [
##############################################################################
# Add ghc-only packages here #
##############################################################################
reflex-todomvc

] else []) ++ builtins.concatLists (map (x: (x.override { mkDerivation = drv: { out = (drv.buildDepends or []) ++ (drv.libraryHaskellDepends or []) ++ (drv.executableHaskellDepends or []); }; }).out) [ reflex reflex-dom reflex-todomvc ])

0 comments on commit 915c308

Please sign in to comment.