2015-12-10 04:07:23 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, git, gperf, pcre, unbound, libev, tokyocabinet, pkgconfig, bash, libsrs2 }:
|
|
|
|
|
|
|
|
let
|
|
|
|
version = "0.9";
|
|
|
|
|
|
|
|
pfixtoolsSrc = fetchFromGitHub {
|
|
|
|
owner = "Fruneau";
|
|
|
|
repo = "pfixtools";
|
|
|
|
rev = "pfixtools-${version}";
|
|
|
|
sha256 = "1vmbrw686f41n6xfjphfshn96vl07ynvnsyjdw9yfn9bfnldcjcq";
|
|
|
|
};
|
|
|
|
|
2017-06-26 20:10:37 +02:00
|
|
|
srcRoot = pfixtoolsSrc.name;
|
2015-12-10 04:07:23 +01:00
|
|
|
|
|
|
|
libCommonSrc = fetchFromGitHub {
|
|
|
|
owner = "Fruneau";
|
|
|
|
repo = "libcommon";
|
|
|
|
rev = "b07e6bdea3d24748e0d39783d7d817096d10cc67";
|
|
|
|
sha256 = "14fxldp29j4vmfmhfgwwi37pj8cz0flm1aykkxlbgakz92d4pm35";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "pfixtools";
|
|
|
|
inherit version;
|
2015-12-10 04:07:23 +01:00
|
|
|
|
|
|
|
src = pfixtoolsSrc;
|
|
|
|
|
2017-03-03 10:21:32 +01:00
|
|
|
patches = [ ./0001-Fix-build-with-unbound-1.6.1.patch ];
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [git gperf pcre unbound libev tokyocabinet bash libsrs2];
|
2015-12-10 04:07:23 +01:00
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
cp -Rp ${libCommonSrc}/* ${srcRoot}/common;
|
|
|
|
chmod -R +w ${srcRoot}/common;
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace postlicyd/policy_tokens.sh \
|
|
|
|
--replace /bin/bash ${bash}/bin/bash;
|
|
|
|
'';
|
|
|
|
|
2019-10-27 14:03:25 +01:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=unused-result -Wno-error=nonnull-compare -Wno-error=format-truncation";
|
2016-08-03 22:13:49 +02:00
|
|
|
|
2019-10-27 14:03:25 +01:00
|
|
|
makeFlags = [ "DESTDIR=$(out)" "prefix=" ];
|
2015-12-10 04:07:23 +01:00
|
|
|
|
|
|
|
meta = {
|
2016-06-20 12:53:46 +02:00
|
|
|
description = "A collection of postfix-related tools";
|
2015-12-10 04:07:23 +01:00
|
|
|
license = with lib.licenses; [ bsd3 ];
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/Fruneau/pfixtools";
|
2021-01-15 08:07:56 +01:00
|
|
|
platforms = lib.platforms.linux;
|
2017-09-04 18:50:50 +02:00
|
|
|
maintainers = with lib.maintainers; [ jerith666 ];
|
2015-12-10 04:07:23 +01:00
|
|
|
};
|
2016-08-02 19:50:55 +02:00
|
|
|
}
|