summaryrefslogtreecommitdiffstats
path: root/pkgs/development/mobile/xcodeenv
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2013-05-29 15:01:55 +0200
committerSander van der Burg <svanderburg@gmail.com>2013-05-29 15:01:55 +0200
commita2b8fb377623d0d94bbb1ac1307e2d9fc210ffc9 (patch)
treecb93f639e7f7c399ad0c004d0d1f7534c746282c /pkgs/development/mobile/xcodeenv
parenta7895de1fc61ae333665d8ae598ec964f3aac88e (diff)
It's impossible to guess the name so we add an extra optional parameter to override it
Diffstat (limited to 'pkgs/development/mobile/xcodeenv')
-rw-r--r--pkgs/development/mobile/xcodeenv/simulate-app.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkgs/development/mobile/xcodeenv/simulate-app.nix b/pkgs/development/mobile/xcodeenv/simulate-app.nix
index 96560160bf54..96f70ea38325 100644
--- a/pkgs/development/mobile/xcodeenv/simulate-app.nix
+++ b/pkgs/development/mobile/xcodeenv/simulate-app.nix
@@ -1,6 +1,9 @@
{stdenv, xcodewrapper}:
-{name, app, device ? "iPhone", baseDir ? ""}:
+{name, appName ? null, app, device ? "iPhone", baseDir ? ""}:
+let
+ _appName = if appName == null then name else appName;
+in
stdenv.mkDerivation {
name = stdenv.lib.replaceChars [" "] [""] name;
buildCommand = ''
@@ -8,8 +11,8 @@ stdenv.mkDerivation {
cat > $out/bin/run-test-simulator << "EOF"
#! ${stdenv.shell} -e
- cd "${app}/${baseDir}/*.app"
- "$(readlink "${xcodewrapper}/bin/iPhone Simulator")" -SimulateApplication './${name}' -SimulateDevice '${device}'
+ cd "${app}/${baseDir}/${_appName}.app"
+ "$(readlink "${xcodewrapper}/bin/iPhone Simulator")" -SimulateApplication './${_appName}' -SimulateDevice '${device}'
EOF
chmod +x $out/bin/run-test-simulator
'';