It's impossible to guess the name so we add an extra optional parameter to override it
This commit is contained in:
parent
a7895de1fc
commit
a2b8fb3776
@ -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
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user