darwin purity: emacs-24.5-mac

This commit is contained in:
Jude Taylor 2015-09-30 17:13:56 -07:00
parent ab16b6a837
commit 0870c09854
6 changed files with 86 additions and 7 deletions

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, ncurses, pkgconfig, texinfo, libxml2, gnutls
{ stdenv, fetchurl, ncurses, pkgconfig, texinfo, libxml2, gnutls, Carbon, Foundation,
libobjc, Cocoa, WebKit, Quartz, ImageCaptureCore, OSAKit
}:
stdenv.mkDerivation rec {
@ -17,7 +18,16 @@ stdenv.mkDerivation rec {
sha256 = "0d4r4mgqxcdba715lbr7rk4bxz7yjxi6wv63kyh6gaqbfgql41vf";
};
buildInputs = [ ncurses pkgconfig texinfo libxml2 gnutls ];
NIX_CFLAGS_COMPILE = "-Wno-deprecated-declarations";
NIX_LDFLAGS = stdenv.lib.optional stdenv.isDarwin
"/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation";
enableParallelBuilding = true;
buildInputs = [
ncurses pkgconfig texinfo libxml2 gnutls Carbon Cocoa Foundation libobjc WebKit Quartz
ImageCaptureCore OSAKit
];
postUnpack = ''
mv $emacsName $name

View File

@ -144,7 +144,19 @@ in rec {
};
};
frameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix { inherit frameworks libs CF; });
overrides = super: {
QuartzCore = stdenv.lib.overrideDerivation super.QuartzCore (drv: {
installPhase = drv.installPhase + ''
f="$out/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h"
substituteInPlace "$f" \
--replace "QuartzCore/../Frameworks/CoreImage.framework/Headers" "CoreImage"
'';
});
};
bareFrameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix { inherit frameworks libs CF; });
frameworks = bareFrameworks // overrides bareFrameworks;
inherit sdk;
}

View File

@ -80,7 +80,7 @@ with frameworks; with libs; {
PreferencePanes = [];
PubSub = [];
Python = [ ApplicationServices ];
QTKit = [ QuickTime ];
QTKit = [ CoreMediaIO CoreMedia MediaToolbox QuickTime VideoToolbox ];
QuickLook = [ ApplicationServices CF ];
QuickTime = [ ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore ];
Ruby = [];
@ -103,7 +103,7 @@ with frameworks; with libs; {
Tk = [ ApplicationServices Carbon X11 ];
VideoDecodeAcceleration = [ CF CoreVideo ];
VideoToolbox = [ CF CoreMedia CoreVideo ];
WebKit = [ ApplicationServices Carbon JavaScriptCore OpenGL X11 ];
WebKit = [ ApplicationServices Carbon JavaScriptCore OpenGL ];
# Umbrellas
Accelerate = [ CoreWLAN IOBluetooth ];
@ -114,6 +114,6 @@ with frameworks; with libs; {
IOBluetooth = [ IOKit ];
JavaVM = [];
OpenDirectory = [];
Quartz = [ QuickLook ];
Quartz = [ QuickLook QTKit ];
QuartzCore = [ ApplicationServices CF CoreVideo OpenCL ];
}

View File

@ -7,6 +7,56 @@ rec {
IOKit = [
"/System/Library/Frameworks/IOKit.framework"
];
JavaScriptCore = [
"/System/Library/Frameworks/JavaScriptCore.framework"
];
QuickLook = [
"/System/Library/Frameworks/QuickLook.framework"
];
Quartz = [
"/System/Library/Frameworks/Quartz.framework"
"/System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo"
"/System/Library/PrivateFrameworks/CorePDF.framework/Versions/A/CorePDF"
"/usr/lib/libspindump.dylib"
];
ImageCaptureCore = [
"/System/Library/Frameworks/ImageCaptureCore.framework"
];
VideoToolbox = [
"/System/Library/Frameworks/VideoToolbox.framework"
"/System/Library/PrivateFrameworks/AppleVA.framework/Versions/A/AppleVA"
];
QuickTime = [
"/System/Library/Frameworks/QuickTime.framework"
];
CoreMedia = [
"/System/Library/Frameworks/CoreMedia.framework"
];
CoreMediaIO = [
"/System/Library/Frameworks/CoreMediaIO.framework"
"/System/Library/PrivateFrameworks/AppSandbox.framework/Versions/A/AppSandbox"
"/System/Library/PrivateFrameworks/AppContainer.framework/Versions/A/AppContainer"
"/System/Library/PrivateFrameworks/SecCodeWrapper.framework/Versions/A/SecCodeWrapper"
"/System/Library/PrivateFrameworks/XPCService.framework/Versions/A/XPCService"
"/usr/lib/libsandbox.1.dylib"
"/usr/lib/libMatch.1.dylib"
];
MediaToolbox = [
"/System/Library/Frameworks/MediaToolbox.framework"
"/System/Library/PrivateFrameworks/CoreAUC.framework/Versions/A/CoreAUC"
"/System/Library/PrivateFrameworks/NetworkStatistics.framework/Versions/A/NetworkStatistics"
];
QTKit = [
"/System/Library/Frameworks/QTKit.framework"
"/System/Library/PrivateFrameworks/CoreMediaAuthoring.framework/Versions/A/CoreMediaAuthoring"
];
OSAKit = [
"/System/Library/Frameworks/OSAKit.framework"
"/usr/lib/libexslt.0.dylib"
];
WebKit = [
"/System/Library/Frameworks/WebKit.framework"
];
DiskArbitration = [
"/System/Library/Frameworks/DiskArbitration.framework"
];

View File

@ -51,6 +51,12 @@ appleDerivation {
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
rmdir $out/System
'';

View File

@ -11113,8 +11113,9 @@ let
emacs24Macport_24_4 = lowPrio (callPackage ../applications/editors/emacs-24/macport-24.4.nix {
stdenv = pkgs.clangStdenv;
});
emacs24Macport_24_5 = lowPrio (callPackage ../applications/editors/emacs-24/macport-24.5.nix {
emacs24Macport_24_5 = lowPrio (newScope darwin.apple_sdk.frameworks ../applications/editors/emacs-24/macport-24.5.nix {
stdenv = pkgs.clangStdenv;
inherit (darwin) libobjc;
});
emacs24Macport = self.emacs24Macport_24_5;