1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "libspf2";
10 version = "2.2.13";
11
12 src = fetchFromGitHub {
13 owner = "helsinki-systems";
14 repo = "libspf2";
15 rev = "v${version}";
16 hash = "sha256-tkCHP3B1sBb0+scHBjX5lCvaeSrZryfaGKye02LFlYs=";
17 };
18
19 nativeBuildInputs = [ autoreconfHook ];
20 strictDeps = true;
21
22 postPatch = ''
23 # disable static bins compilation
24 sed -i \
25 -e '/bin_PROGRAMS/s/spfquery_static//' src/spfquery/Makefile.am \
26 -e '/bin_PROGRAMS/s/spftest_static//' src/spftest/Makefile.am \
27 -e '/bin_PROGRAMS/s/spfd_static//' src/spfd/Makefile.am \
28 -e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am
29 '';
30
31 CFLAGS = "-Wno-error=implicit-function-declaration";
32
33 doCheck = true;
34
35 meta = with lib; {
36 description =
37 "Implementation of the Sender Policy Framework for SMTP " + "authorization (Helsinki Systems fork)";
38 homepage = "https://github.com/helsinki-systems/libspf2";
39 license = with licenses; [
40 lgpl21Plus
41 bsd2
42 ];
43 maintainers = with maintainers; [ euxane ];
44 teams = [ teams.helsinki-systems ];
45 platforms = platforms.all;
46 };
47}