about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libspf2/default.nix
blob: 6ec8f24b713280e0c3bf024214d61f6491d9318f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ lib, stdenv, fetchFromGitHub, autoreconfHook }:

with lib;

stdenv.mkDerivation rec {
  pname = "libspf2";
  version = "2.2.12";

  src = fetchFromGitHub {
    owner = "helsinki-systems";
    repo = "libspf2";
    rev = "v${version}";
    sha256 = "03iiaafdcwh220pqignk407h6klrakwz0zkb8iwk6nkwipkwvhsx";
  };

  postPatch = ''
    # disable static bins compilation
    sed -i \
      -e '/bin_PROGRAMS/s/spfquery_static//' src/spfquery/Makefile.am \
      -e '/bin_PROGRAMS/s/spftest_static//' src/spftest/Makefile.am \
      -e '/bin_PROGRAMS/s/spfd_static//' src/spfd/Makefile.am \
      -e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am
  '';

  # autoreconf necessary because we modified automake files
  nativeBuildInputs = [ autoreconfHook ];

  doCheck = true;

  meta = {
    description = "Implementation of the Sender Policy Framework for SMTP authorization";
    homepage = "https://www.libspf2.org";
    license = with licenses; [ lgpl21Plus bsd2 ];
    maintainers = with maintainers; [ pacien ajs124 das_j ];
    platforms = platforms.all;
  };
}