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";
|
2022-12-17 10:02:37 +00:00
|
|
|
rev = "rel-opendkim-${lib.replaceStrings ["."] ["-"] version}";
|
2021-02-05 17:12:51 +00:00
|
|
|
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"
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optional stdenv.hostPlatform.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
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = [ libbsd openssl libmilter perl ] ++ lib.optional stdenv.hostPlatform.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;
|
|
|
|
};
|
|
|
|
}
|