@@ -0,0 +1,28 @@
1+{ runCommand, stdenv, cmake, fetchgit, libnl, libubox, uci, ubus, json_c }:
2+
3+stdenv.mkDerivation {
4+ pname = "netifd";
5+ version = "unstable-2020-01-18";
6+
7+ src = fetchgit {
8+ url = "https://git.openwrt.org/project/netifd.git";
9+ rev = "1321c1bd8fe921986c4eb39c3783ddd827b79543";
10+ sha256 = "178pckyf1cydi6zzr4bmhksv8vyaks91zv9lqqd2z5nkmccl6vf3";
11+ };
12+
13+ buildInputs = [ libnl libubox uci ubus json_c ];
14+ nativeBuildInputs = [ cmake ];
15+
16+ preBuild = ''
17+ export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE \
18+ -I$(echo "${stdenv.lib.getDev libnl}"/include/libnl*/)"
19+ '';
20+
21+ meta = with stdenv.lib; {
22+ description = "OpenWrt Network interface configuration daemon";
23+ homepage = "https://git.openwrt.org/?p=project/netifd.git;a=summary";
24+ license = licenses.lgpl21;
25+ platforms = platforms.linux;
26+ maintainers = with maintainers; [ petabyteboy ];
27+ };
28+}