about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libspf2
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-08-31 11:57:05 +0000
committerAlyssa Ross <hi@alyssa.is>2019-09-16 22:04:28 +0000
commita0842e8b20cbe1ed717b72775428d1f8fc047fa4 (patch)
treeb86d0614a477f7e092d626d59b888d085aaca400 /nixpkgs/pkgs/development/libraries/libspf2
parentc36b32d476b520ed0d2a37cd0973f98583d6dc7c (diff)
parent8d1510abfb592339e13ce8f6db6f29c1f8b72924 (diff)
downloadnixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.tar
nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.tar.gz
nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.tar.bz2
nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.tar.lz
nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.tar.xz
nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.tar.zst
nixlib-a0842e8b20cbe1ed717b72775428d1f8fc047fa4.zip
Merge commit '8d1510abfb592339e13ce8f6db6f29c1f8b72924'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libspf2')
-rw-r--r--nixpkgs/pkgs/development/libraries/libspf2/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libspf2/default.nix b/nixpkgs/pkgs/development/libraries/libspf2/default.nix
new file mode 100644
index 000000000000..d4b112704284
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libspf2/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, autoreconfHook }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  pname = "libspf2";
+  version = "1.2.10";
+
+  src = fetchurl {
+    url = "https://www.libspf2.org/spf/libspf2-${version}.tar.gz";
+    sha256 = "1j91p0qiipzf89qxq4m1wqhdf01hpn1h5xj4djbs51z23bl3s7nr";
+  };
+
+  patches = [
+    (fetchurl {
+      name = "0001-gcc-variadic-macros.patch";
+      url = "https://github.com/shevek/libspf2/commit/5852828582f556e73751076ad092f72acf7fc8b6.patch";
+      sha256 = "1v6ashqzpr0xidxq0vpkjd8wd66cj8df01kyzj678ljzcrax35hk";
+    })
+  ];
+
+  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 ];
+    platforms = platforms.all;
+  };
+}