
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
37 lines
911 B
Nix
37 lines
911 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";
|
|
};
|
|
}
|