summaryrefslogtreecommitdiffstats
path: root/makefu/5pkgs/farpd/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-07-09 13:11:05 +0200
committertv <tv@krebsco.de>2016-07-09 13:11:05 +0200
commit91ccc70745c232834f180e3b1cfff571cd04b267 (patch)
tree02c3d5b08771493297e8cad9665ccd13e4f785de /makefu/5pkgs/farpd/default.nix
parentdd9dbb3a896d1a0f610d60509a6d02f1737bc74b (diff)
parentec183d5531455d60b4c2423d657963b496e47b4b (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'makefu/5pkgs/farpd/default.nix')
-rw-r--r--makefu/5pkgs/farpd/default.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/makefu/5pkgs/farpd/default.nix b/makefu/5pkgs/farpd/default.nix
new file mode 100644
index 000000000..d58066ee5
--- /dev/null
+++ b/makefu/5pkgs/farpd/default.nix
@@ -0,0 +1,59 @@
+{ stdenv, lib, pkgs, fetchurl,fetchFromGitHub,
+ libpcap, libdnet, libevent, readline, autoconf, automake, libtool, zlib, pcre,
+ ... }:
+stdenv.mkDerivation rec {
+ name = "farpd-${version}";
+
+
+ version = "0.2";
+ src = fetchurl {
+ url = https://launchpad.net/ubuntu/+archive/primary/+files/farpd_0.2.orig.tar.gz ;
+ sha256 = "1m3pynvynr4vgkwh7z5i0yqlang2y0ph32cys3vbi2hx2apk9abd";
+ };
+
+ buildInputs = with pkgs;[
+ automake
+ gnugrep
+ libpcap
+ libdnet
+ pcre
+ libevent
+ readline
+ autoconf
+ libtool
+ zlib
+ coreutils
+ python
+ pythonPackages.sqlite3
+ ];
+ patches = [
+ ./farpd_0.2-11.diff
+ ];
+ # removes user install script from Makefile before automake
+ #patches = [ ./autoconf.patch ];
+ preConfigure = ''
+ autoreconf -fi
+
+ substituteInPlace configure \
+ --replace "libpcap.a" "libpcap.so" \
+ --replace "libevent.a" "libevent.so" \
+ --replace "net/bpf.h" "pcap/bpf.h"
+ '';
+
+ makeFlags = [ "LIBS=-lz" ];
+ configureFlags = [
+ "--with-libpcap=${libpcap}"
+ "--with-libevent=${libevent}"
+ "--with-libdnet=${libdnet}"
+ ];
+ postInstall = ''
+ mv $out/sbin/arpd $out/sbin/farpd
+ mv $out/share/man/man8/arpd.8 $out/share/man/man8/farpd.8
+ '';
+
+ meta = {
+ homepage = https://launchpad.net/ubuntu/+source/farpd/ ;
+ description = "fake arp";
+ license = lib.licenses.gpl2;
+ };
+}