2013-01-07 15:52:42 +00:00
|
|
|
{stdenv, xcodewrapper}:
|
|
|
|
{name, app, device ? "iPhone", baseDir ? ""}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2013-02-12 10:35:21 +00:00
|
|
|
name = stdenv.lib.replaceChars [" "] [""] name;
|
2013-01-07 15:52:42 +00:00
|
|
|
buildCommand = ''
|
|
|
|
ensureDir $out/bin
|
|
|
|
cat > $out/bin/run-test-simulator << "EOF"
|
|
|
|
#! ${stdenv.shell} -e
|
|
|
|
|
2013-05-29 13:50:24 +01:00
|
|
|
cd "${app}/${baseDir}/*.app"
|
2013-02-12 10:35:21 +00:00
|
|
|
"$(readlink "${xcodewrapper}/bin/iPhone Simulator")" -SimulateApplication './${name}' -SimulateDevice '${device}'
|
2013-01-07 15:52:42 +00:00
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/run-test-simulator
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
|