1 { stdenv, lib, fetchFromGitHub, git, gperf, pcre, unbound, libev, tokyocabinet, pkg-config, bash, libsrs2 }:
6 pfixtoolsSrc = fetchFromGitHub {
9 rev = "pfixtools-${version}";
10 sha256 = "1vmbrw686f41n6xfjphfshn96vl07ynvnsyjdw9yfn9bfnldcjcq";
13 srcRoot = pfixtoolsSrc.name;
15 libCommonSrc = fetchFromGitHub {
18 rev = "b07e6bdea3d24748e0d39783d7d817096d10cc67";
19 sha256 = "14fxldp29j4vmfmhfgwwi37pj8cz0flm1aykkxlbgakz92d4pm35";
30 patches = [ ./0001-Fix-build-with-unbound-1.6.1.patch ];
32 nativeBuildInputs = [ pkg-config ];
33 buildInputs = [git gperf pcre unbound libev tokyocabinet bash libsrs2];
36 cp -Rp ${libCommonSrc}/* ${srcRoot}/common;
37 chmod -R +w ${srcRoot}/common;
41 substituteInPlace postlicyd/policy_tokens.sh \
42 --replace /bin/bash ${bash}/bin/bash;
44 substituteInPlace postlicyd/*_tokens.sh \
45 --replace "unsigned int" "size_t"
48 env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-result -Wno-error=nonnull-compare -Wno-error=format-truncation";
50 makeFlags = [ "DESTDIR=$(out)" "prefix=" ];
53 description = "A collection of postfix-related tools";
54 license = with lib.licenses; [ bsd3 ];
55 homepage = "https://github.com/Fruneau/pfixtools";
56 platforms = lib.platforms.linux;
57 maintainers = with lib.maintainers; [ jerith666 ];