introduce separate cf-private package to account for no CLT
This commit is contained in:
parent
bcf536ff3f
commit
7283bb7466
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, fetchFromGitHub, ncurses, gettext, pkgconfig
|
{ stdenv, fetchFromGitHub, ncurses, gettext, pkgconfig
|
||||||
|
|
||||||
# apple frameworks
|
# apple frameworks
|
||||||
, CoreServices, CoreData, Cocoa, Foundation, libobjc }:
|
, CoreServices, CoreData, Cocoa, Foundation, libobjc, cf-private }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "vim-${version}";
|
name = "vim-${version}";
|
||||||
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
|||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
buildInputs = [ ncurses pkgconfig ]
|
buildInputs = [ ncurses pkgconfig ]
|
||||||
++ stdenv.lib.optionals stdenv.isDarwin [ CoreData CoreServices Cocoa Foundation libobjc ];
|
++ stdenv.lib.optionals stdenv.isDarwin [ cf-private CoreData CoreServices Cocoa Foundation libobjc ];
|
||||||
nativeBuildInputs = [ gettext ];
|
nativeBuildInputs = [ gettext ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
|
@ -50,6 +50,9 @@ let
|
|||||||
|
|
||||||
phases = [ "installPhase" "fixupPhase" ];
|
phases = [ "installPhase" "fixupPhase" ];
|
||||||
|
|
||||||
|
# because we copy files from the system
|
||||||
|
preferLocalBuild = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
linkFramework() {
|
linkFramework() {
|
||||||
local path="$1"
|
local path="$1"
|
||||||
|
@ -47,16 +47,6 @@ appleDerivation {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# gross! convince apple to release these as part of CF
|
|
||||||
cp /System/Library/Frameworks/CoreFoundation.framework/Headers/{CFAttributedString,CFNotificationCenter}.h \
|
|
||||||
"$out/System/Library/Frameworks/CoreFoundation.framework/Headers"
|
|
||||||
|
|
||||||
cat >> $out/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h <<EOF
|
|
||||||
/* extra private system files [IMPURE] */
|
|
||||||
#include <CoreFoundation/CFAttributedString.h>
|
|
||||||
#include <CoreFoundation/CFNotificationCenter.h>
|
|
||||||
EOF
|
|
||||||
|
|
||||||
mv $out/System/* $out
|
mv $out/System/* $out
|
||||||
rmdir $out/System
|
rmdir $out/System
|
||||||
'';
|
'';
|
||||||
|
18
pkgs/os-specific/darwin/cf-private/default.nix
Normal file
18
pkgs/os-specific/darwin/cf-private/default.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{ stdenv, osx_private_sdk, CF }:
|
||||||
|
|
||||||
|
let
|
||||||
|
headers = [
|
||||||
|
"CFAttributedString.h"
|
||||||
|
"CFNotificationCenter.h"
|
||||||
|
"CoreFoundation.h"
|
||||||
|
];
|
||||||
|
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
name = "${CF.name}-private";
|
||||||
|
unpackPhase = ":";
|
||||||
|
buildPhase = ":";
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/include/CoreFoundation
|
||||||
|
install -m 0644 ${osx_private_sdk}/PrivateSDK10.10.sparse.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/{${stdenv.lib.concatStringsSep "," headers}} $out/include/CoreFoundation
|
||||||
|
'';
|
||||||
|
}
|
@ -1,16 +1,7 @@
|
|||||||
{ stdenv, fetchzip }:
|
{ stdenv, fetchgit }:
|
||||||
|
|
||||||
let full = stdenv.lib.overrideDerivation (fetchzip {
|
fetchgit {
|
||||||
url = "https://github.com/samdmarshall/OSXPrivateSDK/tarball/69bf3c7f7140ed6ab2b6684b427bd457209858fe";
|
url = "https://github.com/samdmarshall/OSXPrivateSDK.git";
|
||||||
name = "osx-private-sdk-10.9";
|
rev = "f4d52b60e86b496abfaffa119a7d299562d99783";
|
||||||
sha256 = "1agl4kyry6m7yz3sql5mrbvmd1xkmb4nbq976phcpk19inans1zm";
|
sha256 = "0v1l11fqpqnzd5l2vq5c63jm1vrba56r06zpqnag87j5p1gic8lp";
|
||||||
}) (drv: {
|
|
||||||
postFetch = ''
|
|
||||||
unpackFile() {
|
|
||||||
tar xzf "$1"
|
|
||||||
}
|
|
||||||
'' + drv.postFetch;
|
|
||||||
}); in {
|
|
||||||
outPath = "${full}/PrivateSDK10.9";
|
|
||||||
passthru.sdk10 = "${full}/PrivateSDK10.10";
|
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,8 @@ in rec {
|
|||||||
export MACOSX_DEPLOYMENT_TARGET=10.7
|
export MACOSX_DEPLOYMENT_TARGET=10.7
|
||||||
export SDKROOT=
|
export SDKROOT=
|
||||||
export CMAKE_OSX_ARCHITECTURES=x86_64
|
export CMAKE_OSX_ARCHITECTURES=x86_64
|
||||||
|
# Workaround for https://openradar.appspot.com/22671534 on 10.11.
|
||||||
|
export gl_cv_func_getcwd_abort_bug=no
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# The one dependency of /bin/sh :(
|
# The one dependency of /bin/sh :(
|
||||||
|
@ -9483,6 +9483,11 @@ let
|
|||||||
|
|
||||||
cctools = (callPackage ../os-specific/darwin/cctools/port.nix { inherit libobjc; }).native;
|
cctools = (callPackage ../os-specific/darwin/cctools/port.nix { inherit libobjc; }).native;
|
||||||
|
|
||||||
|
cf-private = callPackage ../os-specific/darwin/cf-private {
|
||||||
|
inherit (apple-source-releases) CF;
|
||||||
|
inherit osx_private_sdk;
|
||||||
|
};
|
||||||
|
|
||||||
maloader = callPackage ../os-specific/darwin/maloader {
|
maloader = callPackage ../os-specific/darwin/maloader {
|
||||||
inherit opencflite;
|
inherit opencflite;
|
||||||
};
|
};
|
||||||
@ -13000,7 +13005,7 @@ let
|
|||||||
|
|
||||||
vim = callPackage ../applications/editors/vim {
|
vim = callPackage ../applications/editors/vim {
|
||||||
inherit (darwin.apple_sdk.frameworks) CoreServices Cocoa Foundation CoreData;
|
inherit (darwin.apple_sdk.frameworks) CoreServices Cocoa Foundation CoreData;
|
||||||
inherit (darwin) libobjc;
|
inherit (darwin) libobjc cf-private;
|
||||||
};
|
};
|
||||||
|
|
||||||
macvim = callPackage ../applications/editors/vim/macvim.nix { stdenv = clangStdenv; };
|
macvim = callPackage ../applications/editors/vim/macvim.nix { stdenv = clangStdenv; };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user