Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 44 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 libpcap, 6}: 7 8stdenv.mkDerivation rec { 9 pname = "cdpr"; 10 version = "2.4"; 11 12 src = fetchurl { 13 url = "mirror://sourceforge/${pname}/${pname}/${version}/${pname}-${version}.tgz"; 14 sha256 = "1idyvyafkk0ifcbi7mc65b60qia6hpsdb6s66j4ggqp7if6vblrj"; 15 }; 16 patches = [ 17 # Pull fix pending upstream inclusion for gcc-10 compatibility: 18 # https://sourceforge.net/p/cdpr/bugs/3/ 19 (fetchurl { 20 name = "fno-common"; 21 url = "https://sourceforge.net/p/cdpr/bugs/3/attachment/0001-cdpr-fix-build-on-gcc-10-fno-common.patch"; 22 sha256 = "023cvkpc4ry1pbjd91kkwj4af3hia0layk3fp8q40vh6mbr14pnp"; 23 }) 24 ]; 25 26 postPatch = '' 27 substituteInPlace Makefile --replace 'gcc' '"$$CC"' 28 ''; 29 30 buildInputs = [ libpcap ]; 31 32 installPhase = '' 33 install -Dm755 cdpr $out/bin/cdpr 34 ''; 35 36 meta = with lib; { 37 description = "Cisco Discovery Protocol Reporter"; 38 homepage = "https://cdpr.sourceforge.net/"; 39 license = licenses.gpl2Plus; 40 platforms = platforms.unix; 41 maintainers = [ maintainers.sgo ]; 42 mainProgram = "cdpr"; 43 }; 44}