diff options
Diffstat (limited to 'flakes/libspf2/default.nix')
-rw-r--r-- | flakes/libspf2/default.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/flakes/libspf2/default.nix b/flakes/libspf2/default.nix new file mode 100644 index 0000000..a9e5ec3 --- /dev/null +++ b/flakes/libspf2/default.nix | |||
@@ -0,0 +1,34 @@ | |||
1 | { fetchpatch, file, fetchurl, libnsl, stdenv, lib }: | ||
2 | stdenv.mkDerivation rec { | ||
3 | pname = "libspf2"; | ||
4 | version = "1.2.10"; | ||
5 | |||
6 | patches = [ | ||
7 | (fetchpatch { | ||
8 | name = "fix-variadic-macros.patch"; | ||
9 | url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/fix-variadic-macros.patch?h=packages/libspf2"; | ||
10 | sha256 = "00dqpcgjr9jy2qprgqv2qiyvq8y3wlz4yns9xzabf2064jzqh2ic"; | ||
11 | }) | ||
12 | ]; | ||
13 | preConfigure = '' | ||
14 | sed -i -e "s@/usr/bin/file@${file}/bin/file@" ./configure | ||
15 | ''; | ||
16 | configureFlags = [ | ||
17 | "--enable-static" | ||
18 | ]; | ||
19 | postInstall = '' | ||
20 | rm $out/bin/*_static | ||
21 | ''; | ||
22 | src = fetchurl { | ||
23 | url = "https://www.libspf2.org/spf/${pname}-${version}.tar.gz"; | ||
24 | sha256 = "1j91p0qiipzf89qxq4m1wqhdf01hpn1h5xj4djbs51z23bl3s7nr"; | ||
25 | }; | ||
26 | |||
27 | buildInputs = [ libnsl ]; | ||
28 | |||
29 | meta = { | ||
30 | description = "Sender Policy Framework record checking library"; | ||
31 | homepage = "https://www.libspf2.org/"; | ||
32 | platforms = lib.platforms.linux; | ||
33 | }; | ||
34 | } | ||