2021-01-15 10:19:50 +01:00
|
|
|
{ lib, stdenv, fetchurl, libevent, libtirpc }:
|
2012-07-16 12:06:31 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "trickle-1.07";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 20:43:35 +02:00
|
|
|
url = "https://monkey.org/~marius/trickle/${name}.tar.gz";
|
2012-07-16 12:06:31 +02:00
|
|
|
sha256 = "0s1qq3k5mpcs9i7ng0l9fvr1f75abpbzfi1jaf3zpzbs1dz50dlx";
|
|
|
|
};
|
|
|
|
|
2020-08-11 22:33:36 +02:00
|
|
|
buildInputs = [ libevent libtirpc ];
|
2012-07-16 12:06:31 +02:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i 's|libevent.a|libevent.so|' configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
sed -i '/#define in_addr_t/ s:^://:' config.h
|
|
|
|
'';
|
|
|
|
|
2020-08-11 22:33:36 +02:00
|
|
|
NIX_LDFLAGS = [ "-levent" "-ltirpc" ];
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
|
2012-07-16 12:06:31 +02:00
|
|
|
|
2018-07-25 23:44:21 +02:00
|
|
|
configureFlags = [ "--with-libevent" ];
|
2012-07-16 12:06:31 +02:00
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-21 10:44:40 +01:00
|
|
|
|
2012-07-16 12:06:31 +02:00
|
|
|
meta = {
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Lightweight userspace bandwidth shaper";
|
2021-01-15 10:19:50 +01:00
|
|
|
license = lib.licenses.bsd3;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://monkey.org/~marius/pages/?page=trickle";
|
2021-01-15 10:19:50 +01:00
|
|
|
platforms = lib.platforms.linux;
|
2012-07-16 12:06:31 +02:00
|
|
|
};
|
|
|
|
}
|