1 { lib, stdenv, fetchFromGitHub, pkg-config, libbsd, openssl, libmilter
2 , autoreconfHook, perl, makeWrapper, unbound }:
4 stdenv.mkDerivation rec {
6 version = "2.11.0-Beta2";
8 src = fetchFromGitHub {
9 owner = "trusteddomainproject";
11 rev = "rel-opendkim-${lib.replaceChars ["."] ["-"] version}";
12 sha256 = "0nx3in8sa6xna4vfacj8g60hfzk61jpj2ldag80xzxip9c3rd2pw";
16 "--with-milter=${libmilter}"
17 "ac_cv_func_malloc_0_nonnull=yes"
18 "ac_cv_func_realloc_0_nonnull=yes"
19 ] ++ lib.optional stdenv.isDarwin "--with-unbound=${unbound}";
21 nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper ];
23 buildInputs = [ libbsd openssl libmilter perl ] ++ lib.optional stdenv.isDarwin unbound;
26 wrapProgram $out/sbin/opendkim-genkey \
27 --prefix PATH : ${openssl.bin}/bin
31 description = "C library for producing DKIM-aware applications and an open source milter for providing DKIM service";
32 homepage = "http://www.opendkim.org/";
33 maintainers = with maintainers; [ abbradar ];
34 license = licenses.bsd3;
35 platforms = platforms.unix;