summary refs log tree commit diff
path: root/pkgs/tools/misc/contacts/default.nix
blob: b262626b1363e9467fc06a71541f3f664df0ffe7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, fetchurl, xcbuildHook, cf-private, Foundation, AddressBook }:

stdenv.mkDerivation rec {
  version = "1.1a-3";
  name = "contacts-${version}";

  src = fetchurl {
    url = "https://github.com/dhess/contacts/archive/4092a3c6615d7a22852a3bafc44e4aeeb698aa8f.tar.gz";
    sha256 = "0wdqc1ndgrdhqapvvgx5xihc750szv08lp91x4l6n0gh59cpxpg3";
  };

  nativeBuildInputs = [ xcbuildHook ];

  buildInputs = [
    Foundation AddressBook
    # Needed for OBJC_CLASS_$_NSArray symbols.
    cf-private
  ];

  installPhase = ''
    mkdir -p $out/bin
    cp Products/Default/contacts $out/bin
  '';

  meta = with stdenv.lib; {
    description = "Access contacts from the Mac address book from command-line";
    homepage    = http://www.gnufoo.org/contacts/contacts.html;
    license     = licenses.gpl2;
    maintainers = with maintainers; [ jwiegley ];
    platforms   = stdenv.lib.platforms.darwin;
    hydraPlatforms = stdenv.lib.platforms.darwin;
  };
}