mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 15:44:20 +00:00
5b0ca88d97
- Moved mobile development tools into a separate folder
18 lines
437 B
Nix
18 lines
437 B
Nix
{stdenv, xcodewrapper}:
|
|
{name, app, device ? "iPhone", baseDir ? ""}:
|
|
|
|
stdenv.mkDerivation {
|
|
inherit 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
|
|
'';
|
|
}
|
|
|