2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, libbsd, openssl, libmilter
|
2021-12-06 16:07:01 +00:00
|
|
|
, autoreconfHook, perl, makeWrapper, unbound }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "opendkim";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "2.11.0-Beta2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "trusteddomainproject";
|
|
|
|
repo = "OpenDKIM";
|
|
|
|
rev = "rel-opendkim-${lib.replaceChars ["."] ["-"] version}";
|
|
|
|
sha256 = "0nx3in8sa6xna4vfacj8g60hfzk61jpj2ldag80xzxip9c3rd2pw";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags= [
|
|
|
|
"--with-milter=${libmilter}"
|
|
|
|
"ac_cv_func_malloc_0_nonnull=yes"
|
|
|
|
"ac_cv_func_realloc_0_nonnull=yes"
|
2021-12-06 16:07:01 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin "--with-unbound=${unbound}";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildInputs = [ libbsd openssl libmilter perl ] ++ lib.optional stdenv.isDarwin unbound;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/sbin/opendkim-genkey \
|
|
|
|
--prefix PATH : ${openssl.bin}/bin
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "C library for producing DKIM-aware applications and an open source milter for providing DKIM service";
|
|
|
|
homepage = "http://www.opendkim.org/";
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|