about summary refs log tree commit diff
path: root/pkgs/development/mobile
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2013-03-21 14:11:58 +0100
committerSander van der Burg <svanderburg@gmail.com>2013-03-21 14:11:58 +0100
commit647bca444ced822a2735cbd39c23eff67b785729 (patch)
tree7242a82352f9ac74d3a4f44d3c747bd08ee15d84 /pkgs/development/mobile
parent1dbd3a55c4790394ecf43fc8f3b2442856df8241 (diff)
downloadnixlib-647bca444ced822a2735cbd39c23eff67b785729.tar
nixlib-647bca444ced822a2735cbd39c23eff67b785729.tar.gz
nixlib-647bca444ced822a2735cbd39c23eff67b785729.tar.bz2
nixlib-647bca444ced822a2735cbd39c23eff67b785729.tar.lz
nixlib-647bca444ced822a2735cbd39c23eff67b785729.tar.xz
nixlib-647bca444ced822a2735cbd39c23eff67b785729.tar.zst
nixlib-647bca444ced822a2735cbd39c23eff67b785729.zip
Allow appnames with spaces everywhere
Diffstat (limited to 'pkgs/development/mobile')
-rw-r--r--pkgs/development/mobile/androidenv/build-app.nix7
-rw-r--r--pkgs/development/mobile/titaniumenv/build-app.nix8
-rw-r--r--pkgs/development/mobile/xcodeenv/build-app.nix7
3 files changed, 14 insertions, 8 deletions
diff --git a/pkgs/development/mobile/androidenv/build-app.nix b/pkgs/development/mobile/androidenv/build-app.nix
index 3f8af65f3bd8..cf1d1fce50f0 100644
--- a/pkgs/development/mobile/androidenv/build-app.nix
+++ b/pkgs/development/mobile/androidenv/build-app.nix
@@ -13,7 +13,8 @@ let
   androidsdkComposition = androidsdk { inherit platformVersions useGoogleAPIs; };
 in
 stdenv.mkDerivation {
-  inherit name src;
+  name = stdenv.lib.replaceChars [" "] [""] name;
+  inherit src;
   
   ANDROID_HOME = "${androidsdkComposition}/libexec/android-sdk-${platformName}";
 
@@ -36,9 +37,9 @@ stdenv.mkDerivation {
   
   installPhase = ''
     mkdir -p $out
-    mv bin/*-${if release then "release" else "debug"}.apk $out
+    mv "bin/*-${if release then "release" else "debug"}.apk" $out
     
     mkdir -p $out/nix-support
-    echo "file binary-dist $(echo $out/*.apk)" > $out/nix-support/hydra-build-products
+    echo "file binary-dist \"$(echo $out/*.apk)\"" > $out/nix-support/hydra-build-products
   '';
 }
diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix
index 8fe9846c15af..0d35e6c3c2a6 100644
--- a/pkgs/development/mobile/titaniumenv/build-app.nix
+++ b/pkgs/development/mobile/titaniumenv/build-app.nix
@@ -110,13 +110,17 @@ stdenv.mkDerivation {
         if target == "android" then
           ''cp $(ls build/android/bin/*.apk | grep -v '\-unsigned.apk') $out''
         else if target == "iphone" && release then
-           "cp -av build/iphone/build/* $out"
+           ''
+             cp -av build/iphone/build/* $out
+             mkdir -p $out/nix-support
+             echo "file binary-dist \"$(echo $out/Release-iphoneos/*.ipa)\"" > $out/nix-support/hydra-build-products
+           ''
         else if target == "iphone" then ""
         else throw "Target: ${target} is not supported!"}
     
     ${if target == "android" then ''
         mkdir -p $out/nix-support
-        echo "file binary-dist $(ls $out/*.apk)" > $out/nix-support/hydra-build-products
+        echo "file binary-dist \"$(ls $out/*.apk)\"" > $out/nix-support/hydra-build-products
     '' else ""}
   '';
   
diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix
index 535ec0992c13..ac6bbc7f282d 100644
--- a/pkgs/development/mobile/xcodeenv/build-app.nix
+++ b/pkgs/development/mobile/xcodeenv/build-app.nix
@@ -44,7 +44,8 @@ let
   deleteKeychain = "security delete-keychain $keychainName";
 in
 stdenv.mkDerivation {
-  inherit name src;
+  name = stdenv.lib.replaceChars [" "] [""] name;
+  inherit src;
   buildInputs = [ xcodewrapper ];
   buildPhase = ''
     ${stdenv.lib.optionalString release ''
@@ -79,11 +80,11 @@ stdenv.mkDerivation {
     ${stdenv.lib.optionalString release ''
       ${stdenv.lib.optionalString generateIPA ''
         # Produce an IPA file
-        xcrun -sdk iphoneos PackageApplication -v $out/*.app -o $out/${name}.ipa
+        xcrun -sdk iphoneos PackageApplication -v $out/*.app -o "$out/${name}.ipa"
         
         # Add IPA to Hydra build products
         mkdir -p $out/nix-support
-        echo "file binary-dist $(echo $out/*.ipa)" > $out/nix-support/hydra-build-products
+        echo "file binary-dist \"$(echo $out/*.ipa)\"" > $out/nix-support/hydra-build-products
       ''}
       
       # Delete our temp keychain