Unverified Commit 9523d16a authored by Thomas Gerbet's avatar Thomas Gerbet Committed by GitHub
Browse files

Merge pull request #261633 from helsinki-systems/upd/libspf2

libspf2: 2.2.12 -> 2.2.13 and make deps strict
parents 6958acea 52574a4d
Loading
Loading
Loading
Loading
+5 −13
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, autoreconfHook, fetchpatch }:
{ lib, stdenv, fetchFromGitHub, autoreconfHook }:

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

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

  patches = [
    # glibc-2.34 compat
    (fetchpatch {
      url = "https://raw.githubusercontent.com/gentoo/gentoo/dbb8a5c9f749cc11e61cfe558f164b165cbc30cb/mail-filter/libspf2/files/libspf2-1.2.11-undefined-dn_.patch";
      sha256 = "sha256-6JVVkVGCcFJsNeBdVTPcLhW4KoHLY4ai/KXDMliXgPA=";
    })
  ];
  nativeBuildInputs = [ autoreconfHook ];
  strictDeps = true;

  postPatch = ''
    # disable static bins compilation
@@ -28,9 +23,6 @@ stdenv.mkDerivation rec {
      -e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am
  '';

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

  doCheck = true;

  meta = with lib; {