mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
a6663badb1
Changelog: ``` [...] 8.16.1/8.16.1 2020/07/05 [...] LIBMILTER: Fix typo in a macro. Patch from Ignacio Goyret of Alcatel-Lucent. LIBMILTER: Fix reference in xxfi_negotiate documentation. Patch from Sven Neuhaus. LIBMILTER: Fix function name in smfi_addrcpt_par documentation. Patch from G.W. Haywood. LIBMILTER: Fix a potential memory leak in smfi_setsymlist(). Patch from Martin Svec. [...] ```
50 lines
1.5 KiB
Nix
50 lines
1.5 KiB
Nix
{ lib, stdenv, fetchurl, m4, fixDarwinDylibNames }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libmilter";
|
|
version = "8.17.1";
|
|
|
|
src = fetchurl {
|
|
url = "ftp://ftp.sendmail.org/pub/sendmail/sendmail.${version}.tar.gz";
|
|
sha256 = "sha256-BLx2tsiG5tERvn/Y2qMrjOABKKKItrUuBnvCnzhUpuY=";
|
|
};
|
|
|
|
buildPhase = ''
|
|
mkdir -p $out/lib
|
|
cd libmilter
|
|
cat > a.m4 <<EOF
|
|
define(\`confCC', \`$CC')
|
|
define(\`confAR', \`$AR')
|
|
define(\`confEBINDIR', \`$out/libexec')
|
|
define(\`confINCLUDEDIR', \`$out/include')
|
|
define(\`confLIBDIR', \`$out/lib')
|
|
define(\`confMANROOT', \`$out/man/cat')
|
|
define(\`confMANROOTMAN', \`$out/man/man')
|
|
define(\`confMBINDIR', \`$out/sbin')
|
|
define(\`confSBINDIR', \`$out/sbin')
|
|
define(\`confSHAREDLIBDIR', \`$out/lib')
|
|
define(\`confUBINDIR', \`$out/bin')
|
|
define(\`confINCGRP', \`root')
|
|
define(\`confLIBGRP', \`root')
|
|
APPENDDEF(\`confENVDEF', \`-DNETINET6')
|
|
EOF
|
|
export MILTER_SOVER=1
|
|
sh Build -f ./a.m4
|
|
'';
|
|
|
|
patches = [ ./install.patch ./sharedlib.patch ./darwin.patch ];
|
|
|
|
nativeBuildInputs = [ m4 ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
|
fixDarwinDylibNames $out/lib/libmilter.dylib.1
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Sendmail Milter mail filtering API library";
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ fpletz ];
|
|
license = licenses.sendmail;
|
|
};
|
|
}
|