summary refs log tree commit diff
path: root/pkgs/development/libraries/opendkim/default.nix
blob: 66496af12f93ff0dcb7e061574ef7e72928aa203 (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
34
35
36
37
{ stdenv, fetchurl, pkgconfig, libbsd, openssl, libmilter
, autoreconfHook, perl, makeWrapper }:

stdenv.mkDerivation rec {
  pname = "opendkim";
  version = "2.10.3";

  src = fetchurl {
    url = "mirror://sourceforge/opendkim/files/${pname}-${version}.tar.gz";
    sha256 = "06v8bqhh604sz9rh5bvw278issrwjgc4h1wx2pz9a84lpxbvm823";
  };

  configureFlags= [
    "--with-milter=${libmilter}"
    "ac_cv_func_malloc_0_nonnull=yes"
    "ac_cv_func_realloc_0_nonnull=yes"
  ];

  nativeBuildInputs = [ autoreconfHook pkgconfig makeWrapper ];

  buildInputs = [ libbsd openssl libmilter perl ];

  patches = [ ./openssl-1.1.patch ];

  postInstall = ''
    wrapProgram $out/sbin/opendkim-genkey \
      --prefix PATH : ${openssl.bin}/bin
  '';

  meta = with stdenv.lib; {
    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;
  };
}