From 86bf715c49d576c67c0c0746ca2471981124e530 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 5 Nov 2018 20:35:06 +0100 Subject: [PATCH] contacts: add cf-private Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_NSArray", referenced from: objc-class-ref in contacts.o objc-class-ref in FormatHelper.o "_OBJC_CLASS_$_NSMutableArray", referenced from: objc-class-ref in FormatHelper.o ld: symbol(s) not found for architecture x86_64 --- pkgs/tools/misc/contacts/default.nix | 12 +++++++----- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/misc/contacts/default.nix b/pkgs/tools/misc/contacts/default.nix index dc8f776cef66..b262626b1363 100644 --- a/pkgs/tools/misc/contacts/default.nix +++ b/pkgs/tools/misc/contacts/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, xcbuildHook, Foundation, AddressBook }: +{ stdenv, fetchurl, xcbuildHook, cf-private, Foundation, AddressBook }: stdenv.mkDerivation rec { version = "1.1a-3"; @@ -10,16 +10,18 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ xcbuildHook ]; - buildInputs = [ Foundation AddressBook ]; + + buildInputs = [ + Foundation AddressBook + # Needed for OBJC_CLASS_$_NSArray symbols. + cf-private + ]; installPhase = '' mkdir -p $out/bin cp Products/Default/contacts $out/bin ''; - ## FIXME: the framework setup hook isn't adding these correctly - NIX_LDFLAGS = " -F${Foundation}/Library/Frameworks/ -F${AddressBook}/Library/Frameworks/"; - meta = with stdenv.lib; { description = "Access contacts from the Mac address book from command-line"; homepage = http://www.gnufoo.org/contacts/contacts.html; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fd464eed8efa..798b7a29ad3c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1172,6 +1172,7 @@ with pkgs; codec2 = callPackage ../development/libraries/codec2 { }; contacts = callPackage ../tools/misc/contacts { + inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) Foundation AddressBook; };