Merge pull request #43256 from matthewbauer/xcbuild-refactor
xcbuild refactor
This commit is contained in:
commit
81f78e6d3d
@ -1,13 +1,13 @@
|
|||||||
{ runCommand, lib, sdk, platformName, writeText }:
|
{ runCommand, lib, sdks, xcodePlatform, writeText }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
inherit (lib.generators) toPlist;
|
inherit (lib.generators) toPlist;
|
||||||
|
|
||||||
Info = {
|
Info = {
|
||||||
CFBundleIdentifier = platformName;
|
CFBundleIdentifier = "com.apple.platform.${lib.toLower xcodePlatform}";
|
||||||
Type = "Platform";
|
Type = "Platform";
|
||||||
Name = "macosx";
|
Name = lib.toLower xcodePlatform;
|
||||||
};
|
};
|
||||||
|
|
||||||
Version = {
|
Version = {
|
||||||
@ -285,14 +285,18 @@ let
|
|||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
runCommand "MacOSX.platform" {} ''
|
runCommand "Platforms" {} ''
|
||||||
install -D ${writeText "Info.plist" (toPlist {} Info)} $out/Info.plist
|
platform=$out/${xcodePlatform}.platform
|
||||||
install -D ${writeText "version.plist" (toPlist {} Version)} $out/version.plist
|
|
||||||
install -D ${writeText "Architectures.xcspec" (toPlist {} Architectures)} $out/Developer/Library/Xcode/Specifications/Architectures.xcspec
|
|
||||||
install -D ${writeText "PackageTypes.xcspec" (toPlist {} PackageTypes)} $out/Developer/Library/Xcode/Specifications/PackageTypes.xcspec
|
|
||||||
install -D ${writeText "ProductTypes.xcspec" (toPlist {} ProductTypes)} $out/Developer/Library/Xcode/Specifications/ProductTypes.xcspec
|
|
||||||
|
|
||||||
mkdir -p $out/Developer/SDKs/
|
install -D ${writeText "Info.plist" (toPlist {} Info)} $platform/Info.plist
|
||||||
cd $out/Developer/SDKs/
|
install -D ${writeText "version.plist" (toPlist {} Version)} $platform/version.plist
|
||||||
cp -r ${sdk} ${sdk.name}
|
install -D ${writeText "Architectures.xcspec" (toPlist {} Architectures)} $platform/Developer/Library/Xcode/Specifications/Architectures.xcspec
|
||||||
|
install -D ${writeText "PackageTypes.xcspec" (toPlist {} PackageTypes)} $platform/Developer/Library/Xcode/Specifications/PackageTypes.xcspec
|
||||||
|
install -D ${writeText "ProductTypes.xcspec" (toPlist {} ProductTypes)} $platform/Developer/Library/Xcode/Specifications/ProductTypes.xcspec
|
||||||
|
|
||||||
|
# per-platform bins go here
|
||||||
|
mkdir -p $platform/usr/bin
|
||||||
|
|
||||||
|
mkdir -p $platform/Developer
|
||||||
|
ln -s ${sdks} $platform/Developer/SDKs
|
||||||
''
|
''
|
@ -1,11 +1,8 @@
|
|||||||
{ runCommand, lib, toolchainName, sdkName, writeText }:
|
{ runCommand, lib, toolchainName, sdkName, writeText, version, xcodePlatform }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib.generators) toPlist;
|
inherit (lib.generators) toPlist;
|
||||||
|
|
||||||
# TODO: expose MACOSX_DEPLOYMENT_TARGET in nix so we can use it here.
|
|
||||||
version = "10.10";
|
|
||||||
|
|
||||||
SDKSettings = {
|
SDKSettings = {
|
||||||
CanonicalName = sdkName;
|
CanonicalName = sdkName;
|
||||||
DisplayName = sdkName;
|
DisplayName = sdkName;
|
||||||
@ -21,9 +18,11 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
runCommand "MacOSX${version}.sdk" {
|
runCommand "SDKs" {
|
||||||
inherit version;
|
inherit version;
|
||||||
} ''
|
} ''
|
||||||
install -D ${writeText "SDKSettings.plist" (toPlist {} SDKSettings)} $out/SDKSettings.plist
|
sdk=$out/${sdkName}.sdk
|
||||||
install -D ${writeText "SystemVersion.plist" (toPlist {} SystemVersion)} $out/System/Library/CoreServices/SystemVersion.plist
|
install -D ${writeText "SDKSettings.plist" (toPlist {} SDKSettings)} $sdk/SDKSettings.plist
|
||||||
|
install -D ${writeText "SystemVersion.plist" (toPlist {} SystemVersion)} $sdk/System/Library/CoreServices/SystemVersion.plist
|
||||||
|
ln -s $sdk $out/${xcodePlatform}.sdk
|
||||||
''
|
''
|
@ -19,11 +19,9 @@ xcbuildInstallPhase () {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$dontUseXcbuild" ]; then
|
buildPhase=xcbuildBuildPhase
|
||||||
buildPhase=xcbuildBuildPhase
|
if [ -z "$installPhase" ]; then
|
||||||
if [ -z "$installPhase" ]; then
|
|
||||||
installPhase=xcbuildInstallPhase
|
installPhase=xcbuildInstallPhase
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if [ -d "*.xcodeproj" ]; then
|
# if [ -d "*.xcodeproj" ]; then
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
{ runCommand, toolchainName, fetchurl, makeWrapper, stdenv
|
|
||||||
, buildPackages, lib, writeText }:
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
inherit (lib) getBin optionalString;
|
|
||||||
inherit (lib.generators) toPlist;
|
|
||||||
|
|
||||||
ToolchainInfo = {
|
|
||||||
Identifier = toolchainName;
|
|
||||||
};
|
|
||||||
|
|
||||||
# We could pull this out of developer_cmds but it adds an annoying
|
|
||||||
# loop if we want to bootstrap and this is just a tiny script so I'm
|
|
||||||
# not going to bother.
|
|
||||||
mkdep-darwin-src = fetchurl {
|
|
||||||
url = "https://opensource.apple.com/source/developer_cmds/developer_cmds-63/mkdep/mkdep.sh";
|
|
||||||
sha256 = "0n4wpqfslfjs5zbys5yri8pfi2awyhlmknsf6laa5jzqbzq9x541";
|
|
||||||
executable = true;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
|
|
||||||
runCommand "nixpkgs.xctoolchain" {
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
|
||||||
} (''
|
|
||||||
mkdir -p $out
|
|
||||||
install -D ${writeText "ToolchainInfo.plist" (toPlist {} ToolchainInfo)} $out/ToolchainInfo.plist
|
|
||||||
|
|
||||||
mkdir -p $out/usr/include
|
|
||||||
mkdir -p $out/usr/lib
|
|
||||||
mkdir -p $out/usr/libexec
|
|
||||||
mkdir -p $out/usr/share
|
|
||||||
mkdir -p $out/usr/bin
|
|
||||||
|
|
||||||
for bin in ${getBin stdenv.cc}/bin/*; do
|
|
||||||
ln -s $bin $out/usr/bin
|
|
||||||
done
|
|
||||||
|
|
||||||
for bin in ${getBin stdenv.cc.bintools.bintools}/bin/*; do
|
|
||||||
if ! [ -e "$out/usr/bin/$(basename $bin)" ]; then
|
|
||||||
ln -s $bin $out/usr/bin
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
ln -s ${buildPackages.yacc}/bin/yacc $out/usr/bin/yacc
|
|
||||||
ln -s ${buildPackages.yacc}/bin/bison $out/usr/bin/bison
|
|
||||||
ln -s ${buildPackages.flex}/bin/flex $out/usr/bin/flex
|
|
||||||
ln -s ${buildPackages.flex}/bin/flex++ $out/usr/bin/flex++
|
|
||||||
ln -s $out/bin/flex $out/usr/bin/lex
|
|
||||||
|
|
||||||
ln -s ${buildPackages.m4}/bin/m4 $out/usr/bin/m4
|
|
||||||
ln -s $out/usr/bin/m4 $out/usr/bin/gm4
|
|
||||||
|
|
||||||
ln -s ${buildPackages.unifdef}/bin/unifdef $out/usr/bin/unifdef
|
|
||||||
ln -s ${buildPackages.unifdef}/bin/unifdefall $out/usr/bin/unifdefall
|
|
||||||
|
|
||||||
ln -s ${buildPackages.gperf}/bin/gperf $out/usr/bin/gperf
|
|
||||||
ln -s ${buildPackages.indent}/bin/indent $out/usr/bin/indent
|
|
||||||
ln -s ${buildPackages.ctags}/bin/ctags $out/usr/bin/ctags
|
|
||||||
'' + optionalString stdenv.isDarwin ''
|
|
||||||
for bin in ${getBin buildPackages.darwin.cctools}/bin/*; do
|
|
||||||
if ! [ -e "$out/usr/bin/$(basename $bin)" ]; then
|
|
||||||
ln -s $bin $out/usr/bin
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
ln -s ${buildPackages.darwin.bootstrap_cmds}/bin/mig $out/usr/bin
|
|
||||||
ln -s ${mkdep-darwin-src} $out/usr/bin/mkdep
|
|
||||||
'')
|
|
71
pkgs/development/tools/xcbuild/toolchains.nix
Normal file
71
pkgs/development/tools/xcbuild/toolchains.nix
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
{ runCommand, toolchainName, fetchurl, makeWrapper, stdenv
|
||||||
|
, buildPackages, lib, writeText }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
inherit (lib) getBin optionalString;
|
||||||
|
inherit (lib.generators) toPlist;
|
||||||
|
|
||||||
|
ToolchainInfo = {
|
||||||
|
Identifier = toolchainName;
|
||||||
|
};
|
||||||
|
|
||||||
|
# We could pull this out of developer_cmds but it adds an annoying
|
||||||
|
# loop if we want to bootstrap and this is just a tiny script so I'm
|
||||||
|
# not going to bother.
|
||||||
|
mkdep-darwin-src = fetchurl {
|
||||||
|
url = "https://opensource.apple.com/source/developer_cmds/developer_cmds-63/mkdep/mkdep.sh";
|
||||||
|
sha256 = "0n4wpqfslfjs5zbys5yri8pfi2awyhlmknsf6laa5jzqbzq9x541";
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
runCommand "Toolchains" {
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
} (''
|
||||||
|
toolchain=$out/XcodeDefault.xctoolchain
|
||||||
|
mkdir -p $toolchain
|
||||||
|
|
||||||
|
install -D ${writeText "ToolchainInfo.plist" (toPlist {} ToolchainInfo)} $toolchain/ToolchainInfo.plist
|
||||||
|
|
||||||
|
mkdir -p $toolchain/usr/include
|
||||||
|
mkdir -p $toolchain/usr/lib
|
||||||
|
mkdir -p $toolchain/usr/libexec
|
||||||
|
mkdir -p $toolchain/usr/share
|
||||||
|
mkdir -p $toolchain/usr/bin
|
||||||
|
|
||||||
|
for bin in ${getBin stdenv.cc}/bin/*; do
|
||||||
|
ln -s $bin $toolchain/usr/bin
|
||||||
|
done
|
||||||
|
|
||||||
|
for bin in ${getBin stdenv.cc.bintools.bintools}/bin/*; do
|
||||||
|
if ! [ -e "$toolchain/usr/bin/$(basename $bin)" ]; then
|
||||||
|
ln -s $bin $toolchain/usr/bin
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
ln -s ${buildPackages.yacc}/bin/yacc $toolchain/usr/bin/yacc
|
||||||
|
ln -s ${buildPackages.yacc}/bin/bison $toolchain/usr/bin/bison
|
||||||
|
ln -s ${buildPackages.flex}/bin/flex $toolchain/usr/bin/flex
|
||||||
|
ln -s ${buildPackages.flex}/bin/flex++ $toolchain/usr/bin/flex++
|
||||||
|
ln -s $toolchain/bin/flex $toolchain/usr/bin/lex
|
||||||
|
|
||||||
|
ln -s ${buildPackages.m4}/bin/m4 $toolchain/usr/bin/m4
|
||||||
|
ln -s $toolchain/usr/bin/m4 $toolchain/usr/bin/gm4
|
||||||
|
|
||||||
|
ln -s ${buildPackages.unifdef}/bin/unifdef $toolchain/usr/bin/unifdef
|
||||||
|
ln -s ${buildPackages.unifdef}/bin/unifdefall $toolchain/usr/bin/unifdefall
|
||||||
|
|
||||||
|
ln -s ${buildPackages.gperf}/bin/gperf $toolchain/usr/bin/gperf
|
||||||
|
ln -s ${buildPackages.indent}/bin/indent $toolchain/usr/bin/indent
|
||||||
|
ln -s ${buildPackages.ctags}/bin/ctags $toolchain/usr/bin/ctags
|
||||||
|
'' + optionalString stdenv.isDarwin ''
|
||||||
|
for bin in ${getBin buildPackages.darwin.cctools}/bin/*; do
|
||||||
|
if ! [ -e "$toolchain/usr/bin/$(basename $bin)" ]; then
|
||||||
|
ln -s $bin $toolchain/usr/bin
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
ln -s ${buildPackages.darwin.bootstrap_cmds}/bin/mig $toolchain/usr/bin
|
||||||
|
ln -s ${mkdep-darwin-src} $toolchain/usr/bin/mkdep
|
||||||
|
'')
|
@ -1,80 +1,132 @@
|
|||||||
{ stdenv, buildPackages, makeWrapper, writeText, runCommand
|
{ stdenv, lib, buildPackages, makeWrapper, writeText, runCommand
|
||||||
, CoreServices, ImageIO, CoreGraphics }:
|
, CoreServices, ImageIO, CoreGraphics
|
||||||
|
, targetPlatform
|
||||||
|
, xcodePlatform ? targetPlatform.xcodePlatform or "MacOSX"
|
||||||
|
, xcodeVer ? targetPlatform.xcodeVer or "9.4.1"
|
||||||
|
, sdkVer ? targetPlatform.sdkVer or "10.10" }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
|
inherit (lib) toLower;
|
||||||
|
|
||||||
toolchainName = "com.apple.dt.toolchain.XcodeDefault";
|
toolchainName = "com.apple.dt.toolchain.XcodeDefault";
|
||||||
platformName = "com.apple.platform.macosx";
|
sdkName = "${xcodePlatform}${sdkVer}";
|
||||||
sdkName = "macosx10.10";
|
|
||||||
|
# TODO: expose MACOSX_DEPLOYMENT_TARGET in nix so we can use it here.
|
||||||
|
sdkBuildVersion = "17E189";
|
||||||
|
xcodeSelectVersion = "2349";
|
||||||
|
|
||||||
xcbuild = buildPackages.callPackage ./default.nix {
|
xcbuild = buildPackages.callPackage ./default.nix {
|
||||||
inherit CoreServices ImageIO CoreGraphics;
|
inherit CoreServices ImageIO CoreGraphics;
|
||||||
};
|
};
|
||||||
|
|
||||||
toolchain = buildPackages.callPackage ./toolchain.nix {
|
toolchains = buildPackages.callPackage ./toolchains.nix {
|
||||||
inherit toolchainName;
|
inherit toolchainName;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdk = buildPackages.callPackage ./sdk.nix {
|
sdks = buildPackages.callPackage ./sdks.nix {
|
||||||
inherit toolchainName sdkName;
|
inherit toolchainName sdkName xcodePlatform;
|
||||||
|
version = sdkVer;
|
||||||
};
|
};
|
||||||
|
|
||||||
platform = buildPackages.callPackage ./platform.nix {
|
platforms = buildPackages.callPackage ./platforms.nix {
|
||||||
inherit sdk platformName;
|
inherit sdks xcodePlatform;
|
||||||
};
|
};
|
||||||
|
|
||||||
xcconfig = writeText "nix.xcconfig" ''
|
xcconfig = writeText "nix.xcconfig" ''
|
||||||
SDKROOT=${sdkName}
|
SDKROOT=${sdkName}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
xcode-select = writeText "xcode-select" ''
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
-h | --help) ;; # noop
|
||||||
|
-s | --switch) shift;; # noop
|
||||||
|
-r | --reset) ;; # noop
|
||||||
|
-v | --version) echo xcode-select version ${xcodeSelectVersion} ;;
|
||||||
|
-p | --print-path) echo @DEVELOPER_DIR@ ;;
|
||||||
|
--install) ;; # noop
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
xcrun = writeText "xcrun" ''
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--sdk | -sdk) shift ;;
|
||||||
|
--find | -find)
|
||||||
|
shift
|
||||||
|
command -v $1 ;;
|
||||||
|
--log | -log) ;; # noop
|
||||||
|
--verbose | -verbose) ;; # noop
|
||||||
|
--no-cache | -no-cache) ;; # noop
|
||||||
|
--kill-cache | -kill-cache) ;; # noop
|
||||||
|
--show-sdk-path | -show-sdk-path)
|
||||||
|
echo ${sdks}/${sdkName}.sdk ;;
|
||||||
|
--show-sdk-platform-path | -show-sdk-platform-path)
|
||||||
|
echo ${platforms}/${xcodePlatform}.platform ;;
|
||||||
|
--show-sdk-version | -show-sdk-version)
|
||||||
|
echo ${sdkVer} ;;
|
||||||
|
--show-sdk-build-version | -show-sdk-build-version)
|
||||||
|
echo ${sdkBuildVersion} ;;
|
||||||
|
*) break ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
if ! [[ -z "$@" ]]; then
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
runCommand "xcodebuild-${xcbuild.version}" {
|
||||||
name = "xcbuild-wrapper-${xcbuild.version}";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
inherit (xcbuild) meta;
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
# ensure that the toolchain goes in PATH
|
||||||
|
propagatedBuildInputs = [ "${toolchains}/XcodeDefault.xctoolchain/usr" ];
|
||||||
|
|
||||||
phases = [ "installPhase" "fixupPhase" ];
|
passthru = { inherit xcbuild; };
|
||||||
|
|
||||||
installPhase = ''
|
preferLocalBuild = true;
|
||||||
|
} ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
|
||||||
for file in ${xcbuild}/bin/*; do
|
|
||||||
ln -s $file $out/bin
|
|
||||||
done
|
|
||||||
|
|
||||||
mkdir -p $out/usr
|
mkdir -p $out/usr
|
||||||
ln -s $out/bin $out/usr/bin
|
ln -s $out/bin $out/usr/bin
|
||||||
|
|
||||||
mkdir -p $out/Library/Xcode
|
mkdir -p $out/Library/Xcode
|
||||||
ln -s ${xcbuild}/Library/Xcode/Specifications $out/Library/Xcode/Specifications
|
ln -s ${xcbuild}/Library/Xcode/Specifications $out/Library/Xcode/Specifications
|
||||||
|
|
||||||
mkdir -p $out/Platforms
|
ln -s ${platforms} $out/Platforms
|
||||||
ln -s ${platform} $out/Platforms/nixpkgs.platform
|
ln -s ${toolchains} $out/Toolchains
|
||||||
|
|
||||||
mkdir -p $out/Toolchains
|
makeWrapper ${xcbuild}/bin/xcodebuild $out/bin/xcodebuild \
|
||||||
ln -s ${toolchain} $out/Toolchains/nixpkgs.xctoolchain
|
|
||||||
|
|
||||||
wrapProgram $out/bin/xcodebuild \
|
|
||||||
--add-flags "-xcconfig ${xcconfig}" \
|
--add-flags "-xcconfig ${xcconfig}" \
|
||||||
--add-flags "DERIVED_DATA_DIR=." \
|
--add-flags "DERIVED_DATA_DIR=." \
|
||||||
--set DEVELOPER_DIR "$out" \
|
--set DEVELOPER_DIR "$out" \
|
||||||
--set SDKROOT ${sdkName}
|
--set SDKROOT ${sdkName} \
|
||||||
wrapProgram $out/bin/xcrun \
|
--run '[ "$1" = "-version" ] && (echo Xcode ${xcodeVer}; echo Build version ${sdkBuildVersion}) && exit 0'
|
||||||
--set DEVELOPER_DIR "$out" \
|
|
||||||
--set SDKROOT ${sdkName}
|
|
||||||
wrapProgram $out/bin/xcode-select \
|
|
||||||
--set DEVELOPER_DIR "$out" \
|
|
||||||
--set SDKROOT ${sdkName}
|
|
||||||
'';
|
|
||||||
|
|
||||||
inherit (xcbuild) meta;
|
substitute ${xcode-select} $out/bin/xcode-select \
|
||||||
|
--subst-var-by DEVELOPER_DIR $out
|
||||||
|
chmod +x $out/bin/xcode-select
|
||||||
|
|
||||||
passthru = {
|
substitute ${xcrun} $out/bin/xcrun
|
||||||
raw = xcbuild;
|
chmod +x $out/bin/xcrun
|
||||||
};
|
|
||||||
|
|
||||||
preferLocalBuild = true;
|
for bin in PlistBuddy actool builtin-copy builtin-copyPlist \
|
||||||
}
|
builtin-copyStrings builtin-copyTiff \
|
||||||
|
builtin-embeddedBinaryValidationUtility \
|
||||||
|
builtin-infoPlistUtility builtin-lsRegisterURL \
|
||||||
|
builtin-productPackagingUtility builtin-validationUtility \
|
||||||
|
lsbom plutil; do
|
||||||
|
ln -s ${xcbuild}/bin/$bin $out/bin/$bin
|
||||||
|
done
|
||||||
|
|
||||||
|
fixupPhase
|
||||||
|
''
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{ appleDerivation, xcbuild, IOKit }:
|
{ appleDerivation, xcbuildHook, IOKit }:
|
||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
buildInputs = [ xcbuild IOKit ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
buildInputs = [ IOKit ];
|
||||||
xcbuildFlags = "-target caffeinate";
|
xcbuildFlags = "-target caffeinate";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -D Products/Deployment/caffeinate $out/bin/caffeinate
|
install -D Products/Deployment/caffeinate $out/bin/caffeinate
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
{ stdenv, appleDerivation, xcbuild, gnumake, Security
|
{ stdenv, appleDerivation, xcbuildHook, gnumake, Security
|
||||||
, libsecurity_utilities, libsecurity_cdsa_utilities }:
|
, libsecurity_utilities, libsecurity_cdsa_utilities }:
|
||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
buildInputs = [ xcbuild libsecurity_utilities libsecurity_cdsa_utilities ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
buildInputs = [ libsecurity_utilities libsecurity_cdsa_utilities ];
|
||||||
|
|
||||||
DSTROOT = "$out";
|
DSTROOT = "$out";
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
# We can't just run the root build, because https://github.com/facebook/xcbuild/issues/264
|
# We can't just run the root build, because https://github.com/facebook/xcbuild/issues/264
|
||||||
dontUseXcbuild = true;
|
|
||||||
|
|
||||||
# pkill requires special private headers that are unavailable in
|
# pkill requires special private headers that are unavailable in
|
||||||
# NixPkgs. These ones are needed:
|
# NixPkgs. These ones are needed:
|
||||||
@ -49,7 +48,8 @@ appleDerivation {
|
|||||||
# ln -s $out/share/man/man1/pkill.1 $out/share/man/man1/pgrep.1
|
# ln -s $out/share/man/man1/pkill.1 $out/share/man/man1/pgrep.1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ xcbuild ncurses libutil-new ];
|
nativeBuildInputs = [ xcbuild ];
|
||||||
|
buildInputs = [ ncurses libutil-new ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
platforms = stdenv.lib.platforms.darwin;
|
platforms = stdenv.lib.platforms.darwin;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, appleDerivation, fetchurl, xcbuild }:
|
{ stdenv, appleDerivation, fetchurl, xcbuildHook }:
|
||||||
|
|
||||||
appleDerivation rec {
|
appleDerivation rec {
|
||||||
buildInputs = [ xcbuild ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
|
||||||
# These PBXcp calls should be patched in xcbuild to allow them to
|
# These PBXcp calls should be patched in xcbuild to allow them to
|
||||||
# automatically be prefixed.
|
# automatically be prefixed.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, fetchurl, appleDerivation, xcbuild }:
|
{ stdenv, fetchurl, appleDerivation, xcbuildHook }:
|
||||||
|
|
||||||
appleDerivation rec {
|
appleDerivation rec {
|
||||||
buildInputs = [ xcbuild ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
substituteInPlace rpcgen/rpc_main.c \
|
substituteInPlace rpcgen/rpc_main.c \
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
{ stdenv, appleDerivation, xcbuild, lib, hostPlatform, Libc, xnu, libutil-new }:
|
{ stdenv, appleDerivation, xcbuildHook
|
||||||
|
, lib, hostPlatform, Libc, xnu, libutil-new }:
|
||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
buildInputs = [ xcbuild libutil-new ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
buildInputs = [ libutil-new ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-I.";
|
NIX_CFLAGS_COMPILE = "-I.";
|
||||||
NIX_LDFLAGS = "-lutil";
|
NIX_LDFLAGS = "-lutil";
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
{ appleDerivation, xcbuild, CoreSymbolication, xnu, bison, flex, darling, stdenv }:
|
{ appleDerivation, xcbuildHook, CoreSymbolication
|
||||||
|
, xnu, bison, flex, darling, stdenv }:
|
||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
buildInputs = [ xcbuild CoreSymbolication xnu bison flex darling ];
|
nativeBuildInputs = [ xcbuildHook flex bison ];
|
||||||
|
buildInputs = [ CoreSymbolication darling ];
|
||||||
NIX_CFLAGS_COMPILE = "-DCTF_OLD_VERSIONS -DPRIVATE -DYYDEBUG=1 -I${xnu}/Library/Frameworks/System.framework/Headers";
|
NIX_CFLAGS_COMPILE = "-DCTF_OLD_VERSIONS -DPRIVATE -DYYDEBUG=1 -I${xnu}/Library/Frameworks/System.framework/Headers";
|
||||||
NIX_LDFLAGS = "-L./Products/Release";
|
NIX_LDFLAGS = "-L./Products/Release";
|
||||||
xcbuildFlags = "-target dtrace";
|
xcbuildFlags = "-target dtrace";
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{ stdenv, appleDerivation, xcbuild, zlib, bzip2, lzma, ncurses, libutil-new }:
|
{ stdenv, appleDerivation, xcbuildHook, zlib, bzip2, lzma, ncurses, libutil-new }:
|
||||||
|
|
||||||
appleDerivation rec {
|
appleDerivation rec {
|
||||||
buildInputs = [ xcbuild zlib bzip2 lzma ncurses libutil-new ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
buildInputs = [ zlib bzip2 lzma ncurses libutil-new ];
|
||||||
|
|
||||||
# some commands not working:
|
# some commands not working:
|
||||||
# mtree: _simple.h not found
|
# mtree: _simple.h not found
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{ stdenv, appleDerivation, xcbuild }:
|
{ stdenv, appleDerivation, xcbuildHook }:
|
||||||
|
|
||||||
# TODO: make this the official libutil expression once we've integrated xcbuild in the bootstrap
|
# TODO: make this the official libutil expression once we've integrated xcbuild in the bootstrap
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
buildInputs = [ xcbuild ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
substituteInPlace tzlink.c \
|
substituteInPlace tzlink.c \
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
{ stdenv, appleDerivation, xcbuild, openssl, Librpcsvc, xnu, libpcap, developer_cmds }:
|
{ stdenv, appleDerivation, xcbuildHook
|
||||||
|
, openssl, Librpcsvc, xnu, libpcap, developer_cmds }:
|
||||||
|
|
||||||
appleDerivation rec {
|
appleDerivation rec {
|
||||||
buildInputs = [ xcbuild openssl xnu Librpcsvc libpcap developer_cmds ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
buildInputs = [ openssl xnu Librpcsvc libpcap developer_cmds ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = " -I./unbound -I${xnu}/Library/Frameworks/System.framework/Headers/";
|
NIX_CFLAGS_COMPILE = " -I./unbound -I${xnu}/Library/Frameworks/System.framework/Headers/";
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{ appleDerivation, xcbuild, Security
|
{ appleDerivation, xcbuildHook, Security
|
||||||
, libsecurity_codesigning, libsecurity_utilities, libsecurity_cdsa_utilities
|
, libsecurity_codesigning, libsecurity_utilities, libsecurity_cdsa_utilities
|
||||||
, xnu, osx_private_sdk, pcsclite}:
|
, xnu, osx_private_sdk, pcsclite}:
|
||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
buildInputs = [ xcbuild Security libsecurity_utilities
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
buildInputs = [ Security libsecurity_utilities
|
||||||
libsecurity_cdsa_utilities libsecurity_codesigning
|
libsecurity_cdsa_utilities libsecurity_codesigning
|
||||||
pcsclite ];
|
pcsclite ];
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, appleDerivation, xcbuild }:
|
{ stdenv, appleDerivation, xcbuildHook }:
|
||||||
|
|
||||||
appleDerivation rec {
|
appleDerivation rec {
|
||||||
buildInputs = [ xcbuild ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
# NOTE: these hashes must be recalculated for each version change
|
# NOTE: these hashes must be recalculated for each version change
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{ stdenv, appleDerivation, fetchurl, xcbuild, ncurses, bzip2, zlib, lzma }:
|
{ stdenv, appleDerivation, fetchurl, xcbuildHook, ncurses, bzip2, zlib, lzma }:
|
||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
buildInputs = [ xcbuild ncurses bzip2 zlib lzma ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
buildInputs = [ ncurses bzip2 zlib lzma ];
|
||||||
|
|
||||||
# patches to use ncursees
|
# patches to use ncursees
|
||||||
# disables md5
|
# disables md5
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{xcbuild, appleDerivation, apple_sdk, ncurses, libutil-new, lib}:
|
{xcbuildHook, appleDerivation, apple_sdk, ncurses, libutil-new, lib}:
|
||||||
|
|
||||||
appleDerivation {
|
appleDerivation {
|
||||||
buildInputs = [ xcbuild apple_sdk.frameworks.IOKit ncurses libutil-new ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
buildInputs = [ apple_sdk.frameworks.IOKit ncurses libutil-new ];
|
||||||
NIX_LDFLAGS = "-lutil";
|
NIX_LDFLAGS = "-lutil";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -D Products/Release/libtop.a $out/lib/libtop.a
|
install -D Products/Release/libtop.a $out/lib/libtop.a
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, xcbuild }:
|
{ stdenv, fetchFromGitHub, xcbuildHook }:
|
||||||
|
|
||||||
stdenv.mkDerivation
|
stdenv.mkDerivation
|
||||||
{ name = "insert_dylib-2016.08.28";
|
{ name = "insert_dylib-2016.08.28";
|
||||||
@ -8,7 +8,7 @@ stdenv.mkDerivation
|
|||||||
rev = "c8beef66a08688c2feeee2c9b6eaf1061c2e67a9";
|
rev = "c8beef66a08688c2feeee2c9b6eaf1061c2e67a9";
|
||||||
sha256 = "0az38y06pvvy9jf2wnzdwp9mp98lj6nr0ldv0cs1df5p9x2qvbya";
|
sha256 = "0az38y06pvvy9jf2wnzdwp9mp98lj6nr0ldv0cs1df5p9x2qvbya";
|
||||||
};
|
};
|
||||||
buildInputs = [ xcbuild ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
installPhase =
|
installPhase =
|
||||||
''
|
''
|
||||||
prog=$(find . -type f -name insert_dylib)
|
prog=$(find . -type f -name insert_dylib)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, xcbuild, Foundation, AddressBook }:
|
{ stdenv, fetchurl, xcbuildHook, Foundation, AddressBook }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "1.1a-3";
|
version = "1.1a-3";
|
||||||
@ -9,7 +9,8 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0wdqc1ndgrdhqapvvgx5xihc750szv08lp91x4l6n0gh59cpxpg3";
|
sha256 = "0wdqc1ndgrdhqapvvgx5xihc750szv08lp91x4l6n0gh59cpxpg3";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ xcbuild Foundation AddressBook ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
buildInputs = [ Foundation AddressBook ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ fetchurl, stdenv, fetchFromGitHub, xcbuild, libiconv, Cocoa, ncurses }:
|
{ fetchurl, stdenv, fetchFromGitHub, xcbuildHook, libiconv, Cocoa, ncurses }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "pinentry-mac-0.9.4";
|
name = "pinentry-mac-0.9.4";
|
||||||
@ -10,7 +10,8 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0g75302697gqcxyf2hyqzvcbd5pyss1bl2xvfd40wqav7dlyvj83";
|
sha256 = "0g75302697gqcxyf2hyqzvcbd5pyss1bl2xvfd40wqav7dlyvj83";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ xcbuild libiconv Cocoa ncurses ];
|
nativeBuildInputs = [ xcbuildHook ];
|
||||||
|
buildInputs = [ libiconv Cocoa ncurses ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/Applications
|
mkdir -p $out/Applications
|
||||||
|
@ -8604,10 +8604,14 @@ with pkgs;
|
|||||||
|
|
||||||
xc3sprog = callPackage ../development/tools/misc/xc3sprog { };
|
xc3sprog = callPackage ../development/tools/misc/xc3sprog { };
|
||||||
|
|
||||||
xcbuild = callPackage ../development/tools/xcbuild/wrapper.nix {
|
xcodebuild = callPackage ../development/tools/xcbuild/wrapper.nix {
|
||||||
inherit (darwin.apple_sdk.frameworks) CoreServices CoreGraphics ImageIO;
|
inherit (darwin.apple_sdk.frameworks) CoreServices CoreGraphics ImageIO;
|
||||||
stdenv = buildPackages.clangStdenv;
|
stdenv = buildPackages.clangStdenv;
|
||||||
};
|
};
|
||||||
|
xcbuild = xcodebuild;
|
||||||
|
xcbuildHook = makeSetupHook {
|
||||||
|
deps = [ xcbuild ];
|
||||||
|
} ../development/tools/xcbuild/setup-hook.sh ;
|
||||||
|
|
||||||
xmlindent = callPackage ../development/web/xmlindent {};
|
xmlindent = callPackage ../development/web/xmlindent {};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user