1 { lib, stdenv, fetchurl, libevent, libtirpc }:
3 stdenv.mkDerivation rec {
8 url = "https://monkey.org/~marius/trickle/trickle-${version}.tar.gz";
9 sha256 = "0s1qq3k5mpcs9i7ng0l9fvr1f75abpbzfi1jaf3zpzbs1dz50dlx";
12 buildInputs = [ libevent libtirpc ];
15 sed -i 's|libevent.a|libevent.so|' configure
19 sed -i '/#define in_addr_t/ s:^://:' config.h
22 NIX_LDFLAGS = [ "-levent" "-ltirpc" ];
23 env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
25 configureFlags = [ "--with-libevent" ];
27 hardeningDisable = [ "format" ];
30 description = "Lightweight userspace bandwidth shaper";
31 license = lib.licenses.bsd3;
32 homepage = "https://monkey.org/~marius/pages/?page=trickle";
33 platforms = lib.platforms.linux;
34 mainProgram = "trickle";