summaryrefslogtreecommitdiffstats
path: root/pkgs/development/mobile/xcodeenv
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2014-08-04 16:51:47 +0200
committerPeter Simons <simons@cryp.to>2014-08-04 16:51:47 +0200
commit2d326e5032fda2210ff84118a526195f0a68bd24 (patch)
treed3af676b9948c865f1e942e1db51862da5e19ad5 /pkgs/development/mobile/xcodeenv
parent9253a95f6b3f65ecc701ebb10620acfb6d251f17 (diff)
parentb35770818d70924b2b71ae41ead270fe0be8c826 (diff)
Merge remote-tracking branch 'origin/master' into staging.
Conflicts: pkgs/desktops/e18/enlightenment.nix
Diffstat (limited to 'pkgs/development/mobile/xcodeenv')
-rw-r--r--pkgs/development/mobile/xcodeenv/build-app.nix12
-rw-r--r--pkgs/development/mobile/xcodeenv/install.html.template25
2 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix
index b5766c805522..1b4940b0c3d9 100644
--- a/pkgs/development/mobile/xcodeenv/build-app.nix
+++ b/pkgs/development/mobile/xcodeenv/build-app.nix
@@ -15,9 +15,15 @@
, provisioningProfile ? null
, generateIPA ? false
, generateXCArchive ? false
+, enableWirelessDistribution ? false
+, installURL ? null
+, bundleId ? null
+, version ? null
+, title ? null
}:
assert release -> codeSignIdentity != null && certificateFile != null && certificatePassword != null && provisioningProfile != null;
+assert enableWirelessDistribution -> installURL != null && bundleId != null && version != null && title != null;
let
# Set some default values here
@@ -84,6 +90,12 @@ stdenv.mkDerivation {
# Add IPA to Hydra build products
mkdir -p $out/nix-support
echo "file binary-dist \"$(echo $out/*.ipa)\"" > $out/nix-support/hydra-build-products
+
+ ${stdenv.lib.optionalString enableWirelessDistribution ''
+ appname=$(basename $out/*.ipa .ipa)
+ sed -e "s|@INSTALL_URL@|${installURL}?bundleId=${bundleId}\&amp;version=${version}\&amp;title=$appname|" ${./install.html.template} > $out/$appname.html
+ echo "doc install \"$out/$appname.html\"" >> $out/nix-support/hydra-build-products
+ ''}
''}
# Delete our temp keychain
diff --git a/pkgs/development/mobile/xcodeenv/install.html.template b/pkgs/development/mobile/xcodeenv/install.html.template
new file mode 100644
index 000000000000..833b1994162c
--- /dev/null
+++ b/pkgs/development/mobile/xcodeenv/install.html.template
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+
+<html>
+ <head>
+ <title>Install IPA</title>
+ </head>
+
+ <body>
+ <a id="forwardlink" href="@INSTALL_URL@">Go to the install page or wait a second</a>
+
+ <script type="text/javascript">
+ setTimeout(function() {
+ var link = document.getElementById('forwardlink');
+
+ if(document.createEvent) {
+ var eventObj = document.createEvent('MouseEvents');
+ eventObj.initEvent('click', true, false);
+ link.dispatchEvent(eventObj);
+ } else if(document.createEventObject) {
+ link.fireEvent('onclick');
+ }
+ }, 1000);
+ </script>
+ </body>
+</html>