From 0df3d8d6c40f3c323fece42b283f45227f5ea88e Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 24 Oct 2018 12:07:50 +0200 Subject: [PATCH] wxmac: include cf-private Fixes build failure because CoreFoundation doesn't include CFURLGetFSRef anymore. clang++ -mmacosx-version-min=10.7 -c -o basedll_filefn.o -D__WXOSX_COCOA__ -DWXBUILDING -I./src/regex -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE -DwxUSE_BASE=1 -dynamic -fPIC -DPIC -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wno-deprecated-declarations -D_FILE_OFFSET_BITS=64 -I/private/tmp/nix-build-wxmac-3.0.2.drv-0/wxWidgets-3.0.2/lib/wx/include/osx_cocoa-unicode-3.0 -I./include -O2 -fno-strict-aliasing -fno-common ./src/common/filefn.cpp ./src/common/filefn.cpp:849:18: error: use of undeclared identifier 'CFURLCreateFromFSRef' fullURLRef = CFURLCreateFromFSRef(NULL, fsRef); ^ ./src/common/filefn.cpp:875:14: error: use of undeclared identifier 'CFURLGetFSRef' if ( CFURLGetFSRef(url, fsRef) == false ) --- pkgs/development/libraries/wxwidgets/3.0/mac.nix | 10 ++++++---- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/wxwidgets/3.0/mac.nix b/pkgs/development/libraries/wxwidgets/3.0/mac.nix index 9c307b2d15ae..a13ade3bb740 100644 --- a/pkgs/development/libraries/wxwidgets/3.0/mac.nix +++ b/pkgs/development/libraries/wxwidgets/3.0/mac.nix @@ -1,11 +1,9 @@ { stdenv, fetchurl, fetchpatch, expat, libiconv, libjpeg, libpng, libtiff, zlib # darwin only attributes -, derez, rez, setfile +, cf-private, derez, rez, setfile , AGL, Cocoa, Kernel }: -with stdenv.lib; - stdenv.mkDerivation rec { version = "3.0.2"; name = "wxmac-${version}"; @@ -55,6 +53,10 @@ stdenv.mkDerivation rec { expat libiconv libjpeg libpng libtiff zlib derez rez setfile Cocoa Kernel + + # Needed for CFURLGetFSRef, etc. which have deen deprecated + # since 10.9 and are not part of swift-corelibs CoreFoundation. + cf-private ]; propagatedBuildInputs = [ AGL ]; @@ -98,7 +100,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = { + meta = with stdenv.lib; { platforms = platforms.darwin; license = licenses.wxWindows; maintainers = [ maintainers.lnl7 ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 41383f055567..bb2e40952b4a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12692,6 +12692,7 @@ with pkgs; wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix { inherit (darwin.apple_sdk.frameworks) AGL Cocoa Kernel; inherit (darwin.stubs) setfile rez derez; + inherit (darwin) cf-private; }; wxSVG = callPackage ../development/libraries/wxSVG { @@ -21133,7 +21134,7 @@ with pkgs; liblapackWithAtlas = liblapack; liblbfgs = callPackage ../development/libraries/science/math/liblbfgs { }; - + lrs = callPackage ../development/libraries/science/math/lrs { }; m4ri = callPackage ../development/libraries/science/math/m4ri { };