Files
nixpkgs/pkgs/by-name/tr/trickle/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

49 lines
942 B
Nix

{
lib,
stdenv,
fetchurl,
libevent,
libtirpc,
}:
stdenv.mkDerivation rec {
pname = "trickle";
version = "1.07";
src = fetchurl {
url = "https://monkey.org/~marius/trickle/trickle-${version}.tar.gz";
sha256 = "0s1qq3k5mpcs9i7ng0l9fvr1f75abpbzfi1jaf3zpzbs1dz50dlx";
};
buildInputs = [
libevent
libtirpc
];
preConfigure = ''
sed -i 's|libevent.a|libevent.so|' configure
'';
preBuild = ''
sed -i '/#define in_addr_t/ s:^://:' config.h
'';
NIX_LDFLAGS = [
"-levent"
"-ltirpc"
];
env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
configureFlags = [ "--with-libevent" ];
hardeningDisable = [ "format" ];
meta = {
description = "Lightweight userspace bandwidth shaper";
license = lib.licenses.bsd3;
homepage = "https://monkey.org/~marius/pages/?page=trickle";
platforms = lib.platforms.linux;
mainProgram = "trickle";
};
}