xcbuild: move setup hook to xcbuildHook
Not every package that needs xcbuild will want to use its build phase. I have moved the xcbuild setup hook to the new attribute xcbuildHook. This means that dontUseXcbuild is no longer needed. If you just need to call xcbuild on its own you can just refer to xcbuild.
This commit is contained in:
parent
35b2c0edf2
commit
0534ceac81
@ -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,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
|
||||||
|
@ -8607,6 +8607,9 @@ with pkgs;
|
|||||||
inherit (darwin.apple_sdk.frameworks) CoreServices CoreGraphics ImageIO;
|
inherit (darwin.apple_sdk.frameworks) CoreServices CoreGraphics ImageIO;
|
||||||
stdenv = buildPackages.clangStdenv;
|
stdenv = buildPackages.clangStdenv;
|
||||||
};
|
};
|
||||||
|
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