diff --git a/pkgs/tools/misc/contacts/default.nix b/pkgs/tools/misc/contacts/default.nix index 2bfe0eb42665..bd52f1bc0a49 100644 --- a/pkgs/tools/misc/contacts/default.nix +++ b/pkgs/tools/misc/contacts/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, xcbuild, Foundation, AddressBook }: stdenv.mkDerivation rec { version = "1.1a-3"; @@ -9,15 +9,15 @@ stdenv.mkDerivation rec { sha256 = "0wdqc1ndgrdhqapvvgx5xihc750szv08lp91x4l6n0gh59cpxpg3"; }; - preBuild = '' - substituteInPlace Makefile --replace "xcodebuild" "/usr/bin/xcodebuild" - ''; + buildInputs = [ xcbuild Foundation AddressBook ]; installPhase = '' mkdir -p $out/bin - cp ./build/Deployment/contacts $out/bin + cp ./contacts-*/Build/Products/Default-*/contacts $out/bin ''; + 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 b1273fc469b6..4f2a1d837952 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -760,7 +760,9 @@ in cpulimit = callPackage ../tools/misc/cpulimit { }; - contacts = callPackage ../tools/misc/contacts { }; + contacts = callPackage ../tools/misc/contacts { + inherit (darwin.apple_sdk.frameworks) Foundation AddressBook; + }; coturn = callPackage ../servers/coturn { };