]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - pkgs/opendmarc/libspf2.nix
Add opendmarc openarc and opendkim configuration and packages
[perso/Immae/Config/Nix.git] / pkgs / opendmarc / libspf2.nix
1 { stdenv, file, fetchurl, fetchpatch, libnsl }:
2
3 stdenv.mkDerivation rec {
4 name = "libspf2-${version}";
5 version = "1.2.10";
6
7 patches = [
8 (fetchpatch {
9 name = "fix-variadic-macros.patch";
10 url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/fix-variadic-macros.patch?h=packages/libspf2";
11 sha256 = "00dqpcgjr9jy2qprgqv2qiyvq8y3wlz4yns9xzabf2064jzqh2ic";
12 })
13 ];
14 preConfigure = ''
15 sed -i -e "s@/usr/bin/file@${file}/bin/file@" ./configure
16 '';
17 configureFlags = [
18 "--enable-static"
19 ];
20 postInstall = ''
21 rm $out/bin/*_static
22 '';
23 src = fetchurl {
24 url = "https://www.libspf2.org/spf/${name}.tar.gz";
25 sha256 = "1j91p0qiipzf89qxq4m1wqhdf01hpn1h5xj4djbs51z23bl3s7nr";
26 };
27
28 buildInputs = [ libnsl ];
29
30 meta = with stdenv.lib; {
31 description = "Sender Policy Framework record checking library";
32 homepage = https://www.libspf2.org/;
33 platforms = platforms.unix;
34 };
35 }