package iproute2 {
	description = "routing commands and utilities";
	website = "https://wiki.linuxfoundation.org/networking/iproute2";
	anitya = 1392;

	version# = "7.1.0";
	source = remoteTar {
		url = "https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/"+
			"snapshot/iproute2-"+version+".tar.gz";
		checksum = "yc6NdF6GtFUpKtKg6xwF_yxYGyj0eqFQW8RGsgBzKrOiVlE2bpVQlfeZf_ca5wJL";
		compress = gzip;
	};

	env = [
		"CC=cc",
		"PREFIX=/system",
		"SBINDIR=/system/sbin",
	];
	enterSource = true;
	writable = true;
	chmod = true;

	exec = make {
		chdir = false;
		// drop default autoconf options
		configureName = "./configure";
		configure = {
			"prefix": "/system";
			"color": "auto";
		};
		make = [ "CC=cc", "YACC=yacc" ];
		// wants root
		check = nil;
	};

	inputs = [
		pkgconf,
		m4,
		byacc,
		flex,

		libbpf,
		libmnl,
		db,
		libcap,
		kernel-headers,
	];

	runtime = [
		libbpf,
		libmnl,
		db,
		libcap,
	];
}
