1 { lib, stdenv, fetchurl, libpcap }:
3 stdenv.mkDerivation rec {
8 url = "mirror://sourceforge/${pname}/${pname}/${version}/${pname}-${version}.tgz";
9 sha256 = "1idyvyafkk0ifcbi7mc65b60qia6hpsdb6s66j4ggqp7if6vblrj";
12 # Pull fix pending upstream inclusion for gcc-10 compatibility:
13 # https://sourceforge.net/p/cdpr/bugs/3/
16 url = "https://sourceforge.net/p/cdpr/bugs/3/attachment/0001-cdpr-fix-build-on-gcc-10-fno-common.patch";
17 sha256 = "023cvkpc4ry1pbjd91kkwj4af3hia0layk3fp8q40vh6mbr14pnp";
22 substituteInPlace Makefile --replace 'gcc' '"$$CC"'
25 buildInputs = [ libpcap ];
28 install -Dm755 cdpr $out/bin/cdpr
32 description = "Cisco Discovery Protocol Reporter";
33 homepage = "https://cdpr.sourceforge.net/";
34 license = licenses.gpl2Plus;
35 platforms = platforms.unix;
36 maintainers = [ maintainers.sgo ];