2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, libevent, libtirpc }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "trickle";
|
|
|
|
version = "1.07";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-05 21:33:18 +00:00
|
|
|
url = "https://monkey.org/~marius/trickle/trickle-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0s1qq3k5mpcs9i7ng0l9fvr1f75abpbzfi1jaf3zpzbs1dz50dlx";
|
|
|
|
};
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
buildInputs = [ libevent libtirpc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i 's|libevent.a|libevent.so|' configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
sed -i '/#define in_addr_t/ s:^://:' config.h
|
|
|
|
'';
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
NIX_LDFLAGS = [ "-levent" "-ltirpc" ];
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [ "--with-libevent" ];
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Lightweight userspace bandwidth shaper";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://monkey.org/~marius/pages/?page=trickle";
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|