nixpkgs/pkgs/development/mobile/xcodeenv/xcodewrapper.nix

26 lines
804 B
Nix
Raw Normal View History

2014-10-02 17:49:33 +04:00
{stdenv, version, xcodeBaseDir}:
stdenv.mkDerivation {
name = "xcode-wrapper-"+version;
buildCommand = ''
mkdir -p $out/bin
cd $out/bin
ln -s /usr/bin/xcode-select
ln -s /usr/bin/security
2013-10-15 18:32:38 +04:00
ln -s /usr/bin/codesign
2014-10-02 17:49:33 +04:00
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcrun"
2016-01-07 17:43:17 +03:00
ln -s "${xcodeBaseDir}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator"
cd ..
2014-10-02 17:49:33 +04:00
ln -s "${xcodeBaseDir}/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs"
# Check if we have the xcodebuild version that we want
if [ -z "$($out/bin/xcodebuild -version | grep -x 'Xcode ${version}')" ]
then
echo "We require xcodebuild version: ${version}"
exit 1
fi
'';
}