1{ stdenv, fetchurl, xcbuild, Foundation, AddressBook }:
2
3stdenv.mkDerivation rec {
4 version = "1.1a-3";
5 name = "contacts-${version}";
6
7 src = fetchurl {
8 url = "https://github.com/dhess/contacts/archive/4092a3c6615d7a22852a3bafc44e4aeeb698aa8f.tar.gz";
9 sha256 = "0wdqc1ndgrdhqapvvgx5xihc750szv08lp91x4l6n0gh59cpxpg3";
10 };
11
12 buildInputs = [ xcbuild Foundation AddressBook ];
13
14 installPhase = ''
15 mkdir -p $out/bin
16 cp ./contacts-*/Build/Products/Default/contacts $out/bin
17 '';
18
19 ## FIXME: the framework setup hook isn't adding these correctly
20 NIX_LDFLAGS = " -F${Foundation}/Library/Frameworks/ -F${AddressBook}/Library/Frameworks/";
21
22 meta = with stdenv.lib; {
23 description = "Access contacts from the Mac address book from command-line";
24 homepage = http://www.gnufoo.org/contacts/contacts.html;
25 license = licenses.gpl2;
26 maintainers = with maintainers; [ jwiegley ];
27 platforms = stdenv.lib.platforms.darwin;
28 hydraPlatforms = stdenv.lib.platforms.darwin;
29 };
30}