1{ stdenv, lib, fetchgit, cmake, pkg-config, libubox }:
2
3stdenv.mkDerivation {
4 pname = "uclient";
5 version = "unstable-2022-02-24";
6
7 src = fetchgit {
8 url = "https://git.openwrt.org/project/uclient.git";
9 rev = "644d3c7e13c6a64bf5cb628137ee5bd4dada4b74";
10 sha256 = "0vy4whs64699whp92d1zl7a8kh16yrfywqq0yp2y809l9z19sw22";
11 };
12
13 nativeBuildInputs = [ cmake pkg-config ];
14 buidInputs = [ libubox ];
15
16 preConfigure = ''
17 sed -e 's|ubox_include_dir libubox/ustream-ssl.h|ubox_include_dir libubox/ustream-ssl.h HINTS ${libubox}/include|g' \
18 -e 's|ubox_library NAMES ubox|ubox_library NAMES ubox HINTS ${libubox}/lib|g' \
19 -i CMakeLists.txt
20 '';
21
22 meta = with lib; {
23 description = "Tiny OpenWrt fork of libnl";
24 homepage = "https://git.openwrt.org/?p=project/uclient.git;a=summary";
25 license = licenses.isc;
26 maintainers = with maintainers; [ mkg20001 ];
27 mainProgram = "uclient-fetch";
28 platforms = platforms.all;
29 };
30}