diff --git a/pkgs/development/mobile/titaniumenv/examples/default.nix b/pkgs/development/mobile/titaniumenv/examples/default.nix index 9a5736b37ac..73cca85c9f5 100644 --- a/pkgs/development/mobile/titaniumenv/examples/default.nix +++ b/pkgs/development/mobile/titaniumenv/examples/default.nix @@ -1,42 +1,50 @@ { nixpkgs ? -, system ? builtins.currentSystem -, version ? "3.1" +, systems ? [ "x86_64-linux" "x86_64-darwin" ] }: let - pkgs = import nixpkgs { inherit system; }; - pkgs_darwin_x86_64 = import nixpkgs { system = "x86_64-darwin"; }; - versionString = pkgs.stdenv.lib.replaceChars [ "." ] [ "_" ] version; + pkgs = import nixpkgs {}; in rec { - kitchensink_android = import ./kitchensink { - inherit (pkgs) fetchgit; - titaniumenv = builtins.getAttr "titaniumenv_${versionString}" pkgs; - target = "android"; - }; + kitchensink_android = pkgs.lib.genAttrs systems (system: + let + pkgs = import nixpkgs { inherit system; }; + in + import ./kitchensink { + inherit (pkgs) fetchgit titaniumenv; + target = "android"; + }); - kitchensink_iphone = import ./kitchensink { - inherit (pkgs_darwin_x86_64) fetchgit; - titaniumenv = builtins.getAttr "titaniumenv_${versionString}" pkgs_darwin_x86_64; - target = "iphone"; - }; + emulate_kitchensink = pkgs.lib.genAttrs systems (system: + let + pkgs = import nixpkgs { inherit system; }; + in + import ./emulate-kitchensink { + inherit (pkgs.titaniumenv) androidenv; + kitchensink = kitchensink_android; + }); - emulate_kitchensink = import ./emulate-kitchensink { - inherit (pkgs.titaniumenv) androidenv; - kitchensink = kitchensink_android; - }; +} // (if builtins.elem "x86_64-darwin" systems then + let + pkgs = import nixpkgs { system = "x86_64-darwin"; }; + in + rec { + kitchensink_iphone = import ./kitchensink { + inherit (pkgs) fetchgit titaniumenv; + target = "iphone"; + }; + + simulate_kitchensink_iphone = import ./simulate-kitchensink { + inherit (pkgs) stdenv; + inherit (pkgs.titaniumenv) xcodeenv; + kitchensink = kitchensink_iphone; + device = "iPhone"; + }; - simulate_kitchensink_iphone = import ./simulate-kitchensink { - inherit (pkgs_darwin_x86_64) stdenv; - inherit (pkgs_darwin_x86_64.titaniumenv) xcodeenv; - kitchensink = kitchensink_iphone; - device = "iPhone"; - }; - - simulate_kitchensink_ipad = import ./simulate-kitchensink { - inherit (pkgs_darwin_x86_64) stdenv; - inherit (pkgs_darwin_x86_64.titaniumenv) xcodeenv; - kitchensink = kitchensink_iphone; - device = "iPad"; - }; -} + simulate_kitchensink_ipad = import ./simulate-kitchensink { + inherit (pkgs) stdenv; + inherit (pkgs.titaniumenv) xcodeenv; + kitchensink = kitchensink_iphone; + device = "iPad"; + }; +} else {}) diff --git a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix b/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix index b195bfcae7a..4ddfce968a8 100644 --- a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix +++ b/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix @@ -6,8 +6,8 @@ titaniumenv.buildApp { appId = "com.appcelerator.kitchensink"; src = fetchgit { url = https://github.com/appcelerator/KitchenSink.git; - rev = "b68757ef6639e3da564e21038dc9c1aee1f80907"; - sha256 = "17yabdkl0p6pf2a2lcgw1kid2smwc8rnpx0i9fa4avj6930cbh5i"; + rev = "d9f39950c0137a1dd67c925ef9e8046a9f0644ff"; + sha256 = "0aj42ac262hw9n9blzhfibg61kkbp3wky69rp2yhd11vwjlcq1qc"; }; inherit target androidPlatformVersions;