summary refs log tree commit diff
path: root/pkgs/development/mobile/xcodeenv
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2014-08-01 18:34:18 +0200
committerSander van der Burg <svanderburg@gmail.com>2014-08-01 18:34:18 +0200
commit5a918f5f5cfe30cf10698e8b7cd38498828398b3 (patch)
treee4d4d5f0cf9a5995daea5347293bb776c5f4eedd /pkgs/development/mobile/xcodeenv
parent64561b437d78e03c3854fddc8587d6ceb21a02f2 (diff)
downloadnixpkgs-5a918f5f5cfe30cf10698e8b7cd38498828398b3.tar
nixpkgs-5a918f5f5cfe30cf10698e8b7cd38498828398b3.tar.gz
nixpkgs-5a918f5f5cfe30cf10698e8b7cd38498828398b3.tar.bz2
nixpkgs-5a918f5f5cfe30cf10698e8b7cd38498828398b3.tar.lz
nixpkgs-5a918f5f5cfe30cf10698e8b7cd38498828398b3.tar.xz
nixpkgs-5a918f5f5cfe30cf10698e8b7cd38498828398b3.tar.zst
nixpkgs-5a918f5f5cfe30cf10698e8b7cd38498828398b3.zip
Add experimental link to proxy to page that does wireless distributions of IPA files
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.template11
2 files changed, 23 insertions, 0 deletions
diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix
index b5766c80552..92e68f1bda7 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 00000000000..b7c6a9fe662
--- /dev/null
+++ b/pkgs/development/mobile/xcodeenv/install.html.template
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+
+<html>
+    <head>
+        <title>Install IPA</title>
+        <meta http-equiv="refresh" content="1; url=@INSTALL_URL@">
+    </head>
+    
+    <body>
+    </body>
+</html>