mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 11:34:13 +00:00
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
|
||||
|
||||
inherit (lib.generators) toPlist;
|
||||
|
||||
Info = {
|
||||
CFBundleIdentifier = platformName;
|
||||
CFBundleIdentifier = "com.apple.platform.${lib.toLower xcodePlatform}";
|
||||
Type = "Platform";
|
||||
Name = "macosx";
|
||||
Name = lib.toLower xcodePlatform;
|
||||
};
|
||||
|
||||
Version = {
|
||||
@ -285,14 +285,18 @@ let
|
||||
|
||||
in
|
||||
|
||||
runCommand "MacOSX.platform" {} ''
|
||||
install -D ${writeText "Info.plist" (toPlist {} Info)} $out/Info.plist
|
||||
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
|
||||
runCommand "Platforms" {} ''
|
||||
platform=$out/${xcodePlatform}.platform
|
||||
|
||||
mkdir -p $out/Developer/SDKs/
|
||||
cd $out/Developer/SDKs/
|
||||
cp -r ${sdk} ${sdk.name}
|
||||
install -D ${writeText "Info.plist" (toPlist {} Info)} $platform/Info.plist
|
||||
install -D ${writeText "version.plist" (toPlist {} Version)} $platform/version.plist
|
||||
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
|
||||
inherit (lib.generators) toPlist;
|
||||
|
||||
# TODO: expose MACOSX_DEPLOYMENT_TARGET in nix so we can use it here.
|
||||
version = "10.10";
|
||||
|
||||
SDKSettings = {
|
||||
CanonicalName = sdkName;
|
||||
DisplayName = sdkName;
|
||||
@ -21,9 +18,11 @@ let
|
||||
};
|
||||
in
|
||||
|
||||
runCommand "MacOSX${version}.sdk" {
|
||||
runCommand "SDKs" {
|
||||
inherit version;
|
||||
} ''
|
||||
install -D ${writeText "SDKSettings.plist" (toPlist {} SDKSettings)} $out/SDKSettings.plist
|
||||
install -D ${writeText "SystemVersion.plist" (toPlist {} SystemVersion)} $out/System/Library/CoreServices/SystemVersion.plist
|
||||
sdk=$out/${sdkName}.sdk
|
||||
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
|
||||
}
|
||||
|
||||
if [ -z "$dontUseXcbuild" ]; then
|
||||
buildPhase=xcbuildBuildPhase
|
||||
if [ -z "$installPhase" ]; then
|
||||
installPhase=xcbuildInstallPhase
|
||||
fi
|
||||
buildPhase=xcbuildBuildPhase
|
||||
if [ -z "$installPhase" ]; then
|
||||
installPhase=xcbuildInstallPhase
|
||||
fi
|
||||
|
||||
# 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
|
||||
, CoreServices, ImageIO, CoreGraphics }:
|
||||
{ stdenv, lib, buildPackages, makeWrapper, writeText, runCommand
|
||||
, CoreServices, ImageIO, CoreGraphics
|
||||
, targetPlatform
|
||||
, xcodePlatform ? targetPlatform.xcodePlatform or "MacOSX"
|
||||
, xcodeVer ? targetPlatform.xcodeVer or "9.4.1"
|
||||
, sdkVer ? targetPlatform.sdkVer or "10.10" }:
|
||||
|
||||
let
|
||||
|
||||
inherit (lib) toLower;
|
||||
|
||||
toolchainName = "com.apple.dt.toolchain.XcodeDefault";
|
||||
platformName = "com.apple.platform.macosx";
|
||||
sdkName = "macosx10.10";
|
||||
sdkName = "${xcodePlatform}${sdkVer}";
|
||||
|
||||
# TODO: expose MACOSX_DEPLOYMENT_TARGET in nix so we can use it here.
|
||||
sdkBuildVersion = "17E189";
|
||||
xcodeSelectVersion = "2349";
|
||||
|
||||
xcbuild = buildPackages.callPackage ./default.nix {
|
||||
inherit CoreServices ImageIO CoreGraphics;
|
||||
};
|
||||
|
||||
toolchain = buildPackages.callPackage ./toolchain.nix {
|
||||
toolchains = buildPackages.callPackage ./toolchains.nix {
|
||||
inherit toolchainName;
|
||||
};
|
||||
|
||||
sdk = buildPackages.callPackage ./sdk.nix {
|
||||
inherit toolchainName sdkName;
|
||||
sdks = buildPackages.callPackage ./sdks.nix {
|
||||
inherit toolchainName sdkName xcodePlatform;
|
||||
version = sdkVer;
|
||||
};
|
||||
|
||||
platform = buildPackages.callPackage ./platform.nix {
|
||||
inherit sdk platformName;
|
||||
platforms = buildPackages.callPackage ./platforms.nix {
|
||||
inherit sdks xcodePlatform;
|
||||
};
|
||||
|
||||
xcconfig = writeText "nix.xcconfig" ''
|
||||
SDKROOT=${sdkName}
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "xcbuild-wrapper-${xcbuild.version}";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
phases = [ "installPhase" "fixupPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
for file in ${xcbuild}/bin/*; do
|
||||
ln -s $file $out/bin
|
||||
done
|
||||
|
||||
mkdir -p $out/usr
|
||||
ln -s $out/bin $out/usr/bin
|
||||
|
||||
mkdir -p $out/Library/Xcode
|
||||
ln -s ${xcbuild}/Library/Xcode/Specifications $out/Library/Xcode/Specifications
|
||||
|
||||
mkdir -p $out/Platforms
|
||||
ln -s ${platform} $out/Platforms/nixpkgs.platform
|
||||
|
||||
mkdir -p $out/Toolchains
|
||||
ln -s ${toolchain} $out/Toolchains/nixpkgs.xctoolchain
|
||||
|
||||
wrapProgram $out/bin/xcodebuild \
|
||||
--add-flags "-xcconfig ${xcconfig}" \
|
||||
--add-flags "DERIVED_DATA_DIR=." \
|
||||
--set DEVELOPER_DIR "$out" \
|
||||
--set SDKROOT ${sdkName}
|
||||
wrapProgram $out/bin/xcrun \
|
||||
--set DEVELOPER_DIR "$out" \
|
||||
--set SDKROOT ${sdkName}
|
||||
wrapProgram $out/bin/xcode-select \
|
||||
--set DEVELOPER_DIR "$out" \
|
||||
--set 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
|
||||
|
||||
runCommand "xcodebuild-${xcbuild.version}" {
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
inherit (xcbuild) meta;
|
||||
|
||||
passthru = {
|
||||
raw = xcbuild;
|
||||
};
|
||||
# ensure that the toolchain goes in PATH
|
||||
propagatedBuildInputs = [ "${toolchains}/XcodeDefault.xctoolchain/usr" ];
|
||||
|
||||
passthru = { inherit xcbuild; };
|
||||
|
||||
preferLocalBuild = true;
|
||||
}
|
||||
} ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
mkdir -p $out/usr
|
||||
ln -s $out/bin $out/usr/bin
|
||||
|
||||
mkdir -p $out/Library/Xcode
|
||||
ln -s ${xcbuild}/Library/Xcode/Specifications $out/Library/Xcode/Specifications
|
||||
|
||||
ln -s ${platforms} $out/Platforms
|
||||
ln -s ${toolchains} $out/Toolchains
|
||||
|
||||
makeWrapper ${xcbuild}/bin/xcodebuild $out/bin/xcodebuild \
|
||||
--add-flags "-xcconfig ${xcconfig}" \
|
||||
--add-flags "DERIVED_DATA_DIR=." \
|
||||
--set DEVELOPER_DIR "$out" \
|
||||
--set SDKROOT ${sdkName} \
|
||||
--run '[ "$1" = "-version" ] && (echo Xcode ${xcodeVer}; echo Build version ${sdkBuildVersion}) && exit 0'
|
||||
|
||||
substitute ${xcode-select} $out/bin/xcode-select \
|
||||
--subst-var-by DEVELOPER_DIR $out
|
||||
chmod +x $out/bin/xcode-select
|
||||
|
||||
substitute ${xcrun} $out/bin/xcrun
|
||||
chmod +x $out/bin/xcrun
|
||||
|
||||
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 {
|
||||
buildInputs = [ xcbuild IOKit ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
buildInputs = [ IOKit ];
|
||||
xcbuildFlags = "-target caffeinate";
|
||||
installPhase = ''
|
||||
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 }:
|
||||
|
||||
appleDerivation {
|
||||
buildInputs = [ xcbuild libsecurity_utilities libsecurity_cdsa_utilities ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
buildInputs = [ libsecurity_utilities libsecurity_cdsa_utilities ];
|
||||
|
||||
DSTROOT = "$out";
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
appleDerivation {
|
||||
# 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
|
||||
# NixPkgs. These ones are needed:
|
||||
@ -49,7 +48,8 @@ appleDerivation {
|
||||
# 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 = {
|
||||
platforms = stdenv.lib.platforms.darwin;
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, appleDerivation, fetchurl, xcbuild }:
|
||||
{ stdenv, appleDerivation, fetchurl, xcbuildHook }:
|
||||
|
||||
appleDerivation rec {
|
||||
buildInputs = [ xcbuild ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
|
||||
# These PBXcp calls should be patched in xcbuild to allow them to
|
||||
# automatically be prefixed.
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, fetchurl, appleDerivation, xcbuild }:
|
||||
{ stdenv, fetchurl, appleDerivation, xcbuildHook }:
|
||||
|
||||
appleDerivation rec {
|
||||
buildInputs = [ xcbuild ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
|
||||
patchPhase = ''
|
||||
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 {
|
||||
buildInputs = [ xcbuild libutil-new ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
buildInputs = [ libutil-new ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-I.";
|
||||
NIX_LDFLAGS = "-lutil";
|
||||
|
@ -1,7 +1,9 @@
|
||||
{ appleDerivation, xcbuild, CoreSymbolication, xnu, bison, flex, darling, stdenv }:
|
||||
{ appleDerivation, xcbuildHook, CoreSymbolication
|
||||
, xnu, bison, flex, darling, stdenv }:
|
||||
|
||||
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_LDFLAGS = "-L./Products/Release";
|
||||
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 {
|
||||
buildInputs = [ xcbuild zlib bzip2 lzma ncurses libutil-new ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
buildInputs = [ zlib bzip2 lzma ncurses libutil-new ];
|
||||
|
||||
# some commands not working:
|
||||
# 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
|
||||
appleDerivation {
|
||||
buildInputs = [ xcbuild ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
|
||||
prePatch = ''
|
||||
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 {
|
||||
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/";
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
{ appleDerivation, xcbuild, Security
|
||||
{ appleDerivation, xcbuildHook, Security
|
||||
, libsecurity_codesigning, libsecurity_utilities, libsecurity_cdsa_utilities
|
||||
, xnu, osx_private_sdk, pcsclite}:
|
||||
|
||||
appleDerivation {
|
||||
buildInputs = [ xcbuild Security libsecurity_utilities
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
buildInputs = [ Security libsecurity_utilities
|
||||
libsecurity_cdsa_utilities libsecurity_codesigning
|
||||
pcsclite ];
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, appleDerivation, xcbuild }:
|
||||
{ stdenv, appleDerivation, xcbuildHook }:
|
||||
|
||||
appleDerivation rec {
|
||||
buildInputs = [ xcbuild ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
|
||||
patchPhase = ''
|
||||
# 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 {
|
||||
buildInputs = [ xcbuild ncurses bzip2 zlib lzma ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
buildInputs = [ ncurses bzip2 zlib lzma ];
|
||||
|
||||
# patches to use ncursees
|
||||
# disables md5
|
||||
|
@ -1,7 +1,8 @@
|
||||
{xcbuild, appleDerivation, apple_sdk, ncurses, libutil-new, lib}:
|
||||
{xcbuildHook, appleDerivation, apple_sdk, ncurses, libutil-new, lib}:
|
||||
|
||||
appleDerivation {
|
||||
buildInputs = [ xcbuild apple_sdk.frameworks.IOKit ncurses libutil-new ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
buildInputs = [ apple_sdk.frameworks.IOKit ncurses libutil-new ];
|
||||
NIX_LDFLAGS = "-lutil";
|
||||
installPhase = ''
|
||||
install -D Products/Release/libtop.a $out/lib/libtop.a
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, xcbuild }:
|
||||
{ stdenv, fetchFromGitHub, xcbuildHook }:
|
||||
|
||||
stdenv.mkDerivation
|
||||
{ name = "insert_dylib-2016.08.28";
|
||||
@ -8,7 +8,7 @@ stdenv.mkDerivation
|
||||
rev = "c8beef66a08688c2feeee2c9b6eaf1061c2e67a9";
|
||||
sha256 = "0az38y06pvvy9jf2wnzdwp9mp98lj6nr0ldv0cs1df5p9x2qvbya";
|
||||
};
|
||||
buildInputs = [ xcbuild ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
installPhase =
|
||||
''
|
||||
prog=$(find . -type f -name insert_dylib)
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, xcbuild, Foundation, AddressBook }:
|
||||
{ stdenv, fetchurl, xcbuildHook, Foundation, AddressBook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.1a-3";
|
||||
@ -9,7 +9,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0wdqc1ndgrdhqapvvgx5xihc750szv08lp91x4l6n0gh59cpxpg3";
|
||||
};
|
||||
|
||||
buildInputs = [ xcbuild Foundation AddressBook ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
buildInputs = [ Foundation AddressBook ];
|
||||
|
||||
installPhase = ''
|
||||
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 {
|
||||
name = "pinentry-mac-0.9.4";
|
||||
@ -10,7 +10,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0g75302697gqcxyf2hyqzvcbd5pyss1bl2xvfd40wqav7dlyvj83";
|
||||
};
|
||||
|
||||
buildInputs = [ xcbuild libiconv Cocoa ncurses ];
|
||||
nativeBuildInputs = [ xcbuildHook ];
|
||||
buildInputs = [ libiconv Cocoa ncurses ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/Applications
|
||||
|
@ -8604,10 +8604,14 @@ with pkgs;
|
||||
|
||||
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;
|
||||
stdenv = buildPackages.clangStdenv;
|
||||
};
|
||||
xcbuild = xcodebuild;
|
||||
xcbuildHook = makeSetupHook {
|
||||
deps = [ xcbuild ];
|
||||
} ../development/tools/xcbuild/setup-hook.sh ;
|
||||
|
||||
xmlindent = callPackage ../development/web/xmlindent {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user