3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix

34 lines
954 B
Nix
Raw Normal View History

{stdenv}:
2019-02-04 21:43:48 +00:00
{version ? "10.1", xcodeBaseDir ? "/Applications/Xcode.app"}:
assert stdenv.isDarwin;
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 15:32:38 +01:00
ln -s /usr/bin/codesign
ln -s /usr/bin/xcrun
ln -s /usr/bin/plutil
2019-02-04 21:43:48 +00:00
ln -s /usr/bin/clang
ln -s /usr/bin/lipo
ln -s /usr/bin/file
ln -s /usr/bin/rev
2014-10-02 14:49:33 +01:00
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"
2016-01-07 14:43:17 +00:00
ln -s "${xcodeBaseDir}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator"
cd ..
2014-10-02 14:49:33 +01: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
'';
}