1 { lib, stdenv, fetchurl, m4, fixDarwinDylibNames }:
3 stdenv.mkDerivation rec {
8 url = "ftp://ftp.sendmail.org/pub/sendmail/sendmail.${version}.tar.gz";
9 sha256 = "sha256-kPWudMNahICIYZM7oJQgG5AbcMaykDaE3POb2uiloaI=";
16 define(\`confCC', \`$CC')
17 define(\`confAR', \`$AR')
18 define(\`confEBINDIR', \`$out/libexec')
19 define(\`confINCLUDEDIR', \`$out/include')
20 define(\`confLIBDIR', \`$out/lib')
21 define(\`confMANROOT', \`$out/man/cat')
22 define(\`confMANROOTMAN', \`$out/man/man')
23 define(\`confMBINDIR', \`$out/sbin')
24 define(\`confSBINDIR', \`$out/sbin')
25 define(\`confSHAREDLIBDIR', \`$out/lib')
26 define(\`confUBINDIR', \`$out/bin')
27 define(\`confINCGRP', \`root')
28 define(\`confLIBGRP', \`root')
29 APPENDDEF(\`confENVDEF', \`-DNETINET6')
35 patches = [ ./install.patch ./sharedlib.patch ./darwin.patch ];
37 nativeBuildInputs = [ m4 ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
39 postInstall = lib.optionalString stdenv.isDarwin ''
40 fixDarwinDylibNames $out/lib/libmilter.*.1
44 description = "Sendmail Milter mail filtering API library";
45 platforms = platforms.unix;
46 maintainers = with maintainers; [ fpletz ];
47 license = licenses.sendmail;