diff options
author | makefu <github@syntax-fehler.de> | 2016-06-28 02:16:31 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2016-06-28 02:26:17 +0200 |
commit | fa2eb245f30df9f69720ec5853b2c15dd67cdf28 (patch) | |
tree | 8863d2f58d6f6facddd264a82b74ed98a7be9ae6 /makefu/5pkgs/farpd/default.nix | |
parent | b504ad2b446ab250bf3b6b7e22d36c3cb63177f6 (diff) |
m 5 farpd: init
Diffstat (limited to 'makefu/5pkgs/farpd/default.nix')
-rw-r--r-- | makefu/5pkgs/farpd/default.nix | 59 |
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; + }; +} |