1 { stdenv, fetchurl, fetchpatch, ncurses ? null, perl ? null, lib }:
3 stdenv.mkDerivation rec {
8 url = "https://noping.cc/files/${pname}-${version}.tar.bz2";
9 sha256 = "1n2wkmvw6n80ybdwkjq8ka43z2x8mvxq49byv61b52iyz69slf7b";
13 # Add support for ncurses-6.3. A backport of patch pending upstream
14 # inclusion: https://github.com/octo/liboping/pull/61
17 # Pull pending fix for format arguments mismatch:
18 # https://github.com/octo/liboping/pull/60
20 name = "format-args.patch";
21 url = "https://github.com/octo/liboping/commit/7a50e33f2a686564aa43e4920141e6f64e042df1.patch";
22 sha256 = "118fl3k84m3iqwfp49g5qil4lw1gcznzmyxnfna0h7za2nm50cxw";
26 NIX_CFLAGS_COMPILE = lib.optionalString
27 stdenv.cc.isGNU "-Wno-error=format-truncation";
29 buildInputs = [ ncurses perl ];
31 configureFlags = lib.optional (perl == null) "--with-perl-bindings=no";
34 description = "C library to generate ICMP echo requests (a.k.a. ping packets)";
36 liboping is a C library to generate ICMP echo requests, better known as
37 "ping packets". It is intended for use in network monitoring applications
38 or applications that would otherwise need to fork ping(1) frequently.
39 Included is a sample application, called oping, which demonstrates the
42 homepage = "http://noping.cc/";
43 license = licenses.lgpl21;
44 platforms = platforms.unix;
45 maintainers = [ maintainers.bjornfor ];