git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #49081 from LnL7/darwin-wxmac

wxmac: 3.0.2 -> 3.0.4 (darwin)

commit450d33fc5b04828af3b2527f6cc99f9189d80604 authorDaiderd Jordan <daiderd@gmail.com> dateSat 27 Oct 2018, 10:27 (8 years ago) parent1276442fcbaa75
4 files changed+25−54
pkgs/development/libraries/wxwidgets/3.0/mac.nix+11−45 pkgs/os-specific/darwin/cf-private/default.nix+9−7 pkgs/top-level/all-packages.nix+1 pkgs/top-level/darwin-packages.nix+4−2
pkgs/development/libraries/wxwidgets/3.0/mac.nix+11−45
@@ -1,60 +1,26 @@
1−{ stdenv, fetchurl, fetchpatch, expat, libiconv, libjpeg, libpng, libtiff, zlib
1+{ stdenv, fetchzip, fetchpatch, expat, libiconv, libjpeg, libpng, libtiff, zlib
22# darwin only attributes
3−, derez, rez, setfile
3+, cf-private, derez, rez, setfile
44, AGL, Cocoa, Kernel
55}:
66
7−with stdenv.lib;
8−
97stdenv.mkDerivation rec {
10− version = "3.0.2";
8+ version = "3.0.4";
119 name = "wxmac-${version}";
1210
13− src = fetchurl {
14− url = "mirror://sourceforge/wxwindows/wxWidgets-${version}.tar.bz2";
15− sha256 = "346879dc554f3ab8d6da2704f651ecb504a22e9d31c17ef5449b129ed711585d";
11+ src = fetchzip {
12+ url = "https://github.com/wxWidgets/wxWidgets/archive/v${version}.tar.gz";
13+ sha256 = "19mqglghjjqjgz4rbybn3qdgn2cz9xc511nq1pvvli9wx2k8syl1";
1614 };
1715
18− patches =
19− [ # Use std::abs() from <cmath> instead of abs() from <math.h> to avoid problems
20− # with abiguous overloads for clang-3.8 and gcc6.
21− (fetchpatch {
22− name = "patch-stc-abs.diff";
23− url = https://github.com/wxWidgets/wxWidgets/commit/73e9e18ea09ffffcaac50237def0d9728a213c02.patch;
24− sha256 = "0w5whmfzm8waw62jmippming0zffa9064m5b3aw5nixph21rlcvq";
25− })
26−
27− # Various fixes related to Yosemite. Revisit in next stable release.
28− # Please keep an eye on http://trac.wxwidgets.org/ticket/16329 as well
29− # Theoretically the above linked patch should still be needed, but it isn't.
30− # Try to find out why.
31− (fetchpatch {
32− name = "patch-yosemite.diff";
33− url = https://raw.githubusercontent.com/Homebrew/formula-patches/bbf4995/wxmac/patch-yosemite.diff;
34− sha256 = "0ss66z2a79v976mvlrskyj1zmkyaz8hbwm98p29bscfvcx5845jb";
35− })
36−
37− # Remove uncenessary <QuickTime/QuickTime.h> includes
38− # http://trac.wxwidgets.org/changeset/f6a2d1caef5c6d412c84aa900cb0d3990b350938/git-wxWidgets
39− (fetchpatch {
40− name = "patch-quicktime-removal.diff";
41− url = https://raw.githubusercontent.com/Homebrew/formula-patches/bbf4995/wxmac/patch-quicktime-removal.diff;
42− sha256 = "0mzvdk8r70p9s1wj7qzdsqmdrlxlf2dalh9gqs8xjkqq2666yp0y";
43− })
44−
45− # Patch for wxOSXPrintData, custom paper not applied
46− # http://trac.wxwidgets.org/ticket/16959
47− (fetchpatch {
48− name = "wxPaperCustomPatch.patch";
49− url = http://trac.wxwidgets.org/raw-attachment/ticket/16959/wxPaperCustomPatch.patch;
50− sha256 = "0xgscv86f8dhggn9n8bhlq9wlj3ydsicgy9v35sraxyma18cbjvl";
51− })
52− ];
53−
5416 buildInputs = [
5517 expat libiconv libjpeg libpng libtiff zlib
5618 derez rez setfile
5719 Cocoa Kernel
20+
21+ # Needed for CFURLGetFSRef, etc. which have deen deprecated
22+ # since 10.9 and are not part of swift-corelibs CoreFoundation.
23+ cf-private
5824 ];
5925
6026 propagatedBuildInputs = [ AGL ];
@@ -98,7 +64,7 @@ stdenv.mkDerivation rec {
9864
9965 enableParallelBuilding = true;
10066
101− meta = {
67+ meta = with stdenv.lib; {
10268 platforms = platforms.darwin;
10369 license = licenses.wxWindows;
10470 maintainers = [ maintainers.lnl7 ];
pkgs/os-specific/darwin/cf-private/default.nix+9−7
@@ -1,4 +1,4 @@
1−{ CF, apple_sdk }:
1+{ CF, apple_sdk, osx_private_sdk }:
22
33# cf-private is a bit weird, but boils down to CF with a weird setup-hook that
44# makes a build link against the system CoreFoundation rather than our pure one.
@@ -13,10 +13,10 @@
1313# because of their magic "toll-free bridging" support, the symbols for those types
1414# live in CoreFoundation with an ObjC runtime. And because that isn't public, we have
1515# this hack in place to let people link properly anyway. Phew!
16−#
16+#
1717# This can be revisited if Apple ever decide to release the ObjC backend in a publicly
1818# buildable form.
19−#
19+#
2020# This doesn't really need to rebuild CF, but it's cheap, and adding a setup hook to
2121# an existing package was annoying. We need a buildEnv that knows how to add those
2222CF.overrideAttrs (orig: {
@@ -38,22 +38,24 @@ CF.overrideAttrs (orig: {
3838 # this is watchman, who can almost certainly switch to the pure CF once the header
3939 # and functionality is merged in.
4040 installPhase = orig.installPhase + ''
41+ # Copy or overwrite private headers, some of these might already
42+ # exist in CF but the private versions have more information.
4143 basepath="Library/Frameworks/CoreFoundation.framework/Headers"
42− path="$basepath/CFFileDescriptor.h"
44+ cp -Lfv --no-preserve mode ${osx_private_sdk}/include/CoreFoundationPrivateHeaders/* "$out/$basepath"
4345
4446 # Append the include at top level or nobody will notice the header we're about to add
4547 sed -i '/CFNotificationCenter.h/a #include <CoreFoundation/CFFileDescriptor.h>' \
4648 "$out/$basepath/CoreFoundation.h"
4749
48− cp ${apple_sdk.frameworks.CoreFoundation}/$path $out/$path
50+ cp ${apple_sdk.frameworks.CoreFoundation}/$basepath/CFFileDescriptor.h $out/$basepath/CFFileDescriptor.h
4951 '' +
5052 # This one is less likely to go away, but I'll mention it anyway. The issue is at
5153 # https://bugs.swift.org/browse/SR-8744, and the main user I know of is qtbase
5254 ''
53− path="$basepath/CFURLEnumerator.h"
55+ path="$basepath/CFURLEnumerator.h"
5456 sed -i '/CFNotificationCenter.h/a #include <CoreFoundation/CFURLEnumerator.h>' \
5557 "$out/$basepath/CoreFoundation.h"
5658
5759 cp ${apple_sdk.frameworks.CoreFoundation}/$path $out/$path
5860 '';
59−})
61+})
pkgs/top-level/all-packages.nix+1
@@ -12714,6 +12714,7 @@ with pkgs;
1271412714 wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix {
1271512715 inherit (darwin.apple_sdk.frameworks) AGL Cocoa Kernel;
1271612716 inherit (darwin.stubs) setfile rez derez;
12717+ inherit (darwin) cf-private;
1271712718 };
1271812719
1271912720 wxSVG = callPackage ../development/libraries/wxSVG {
pkgs/top-level/darwin-packages.nix+4−2
@@ -31,7 +31,9 @@ in
3131 libcxxabi = pkgs.libcxxabi;
3232 };
3333
34− cf-private = callPackage ../os-specific/darwin/cf-private { inherit (darwin) CF apple_sdk; };
34+ cf-private = callPackage ../os-specific/darwin/cf-private {
35+ inherit (darwin) CF apple_sdk osx_private_sdk;
36+ };
3537
3638 DarwinTools = callPackage ../os-specific/darwin/DarwinTools { };
3739
@@ -74,7 +76,7 @@ in
7476 CoreSymbolication = callPackage ../os-specific/darwin/CoreSymbolication { };
7577
7678 CF = callPackage ../os-specific/darwin/swift-corelibs/corefoundation.nix { inherit (darwin) objc4 ICU; };
77−
79+
7880 # As the name says, this is broken, but I don't want to lose it since it's a direction we want to go in
7981 # libdispatch-broken = callPackage ../os-specific/darwin/swift-corelibs/libdispatch.nix { inherit (darwin) apple_sdk_sierra xnu; };
8082