1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00
nixpkgs/pkgs/development/mobile/xcodeenv/simulate-app.nix
2013-02-12 11:35:21 +01:00

18 lines
475 B
Nix

{stdenv, xcodewrapper}:
{name, app, device ? "iPhone", baseDir ? ""}:
stdenv.mkDerivation {
name = stdenv.lib.replaceChars [" "] [""] name;
buildCommand = ''
ensureDir $out/bin
cat > $out/bin/run-test-simulator << "EOF"
#! ${stdenv.shell} -e
cd '${app}/${baseDir}/${name}.app'
"$(readlink "${xcodewrapper}/bin/iPhone Simulator")" -SimulateApplication './${name}' -SimulateDevice '${device}'
EOF
chmod +x $out/bin/run-test-simulator
'';
}