nixpkgs/pkgs/development/libraries/libmilter/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, m4, fixDarwinDylibNames }:
stdenv.mkDerivation rec {
pname = "libmilter";
version = "8.17.1";
2016-10-21 00:04:38 +00:00
src = fetchurl {
2016-10-21 00:04:38 +00:00
url = "ftp://ftp.sendmail.org/pub/sendmail/sendmail.${version}.tar.gz";
sha256 = "sha256-BLx2tsiG5tERvn/Y2qMrjOABKKKItrUuBnvCnzhUpuY=";
};
2016-10-21 00:04:38 +00:00
buildPhase = ''
mkdir -p $out/lib
cd libmilter
cat > a.m4 <<EOF
2018-12-11 23:05:32 +00:00
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')
2015-01-19 09:44:28 +00:00
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
'';
2016-10-21 00:04:38 +00:00
meta = with lib; {
2016-10-21 00:04:38 +00:00
description = "Sendmail Milter mail filtering API library";
platforms = platforms.unix;
maintainers = with maintainers; [ fpletz ];
2018-10-18 19:00:17 +00:00
license = licenses.sendmail;
};
}