2023-02-16 17:41:37 +00:00
|
|
|
{ stdenv, lib, fetchgit, cmake, pkg-config, json_c, with_lua ? false, lua5_1 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "libubox";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "unstable-2023-01-03";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.openwrt.org/project/libubox.git";
|
2023-02-16 17:41:37 +00:00
|
|
|
rev = "eac92a4d5d82eb31e712157e7eb425af728b2c43";
|
|
|
|
sha256 = "0w6mmwmd3ljhkqfk0qswq28dp63k30s3brlgf8lyi7vj7mrhvn3c";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
cmakeFlags = [ "-DBUILD_EXAMPLES=OFF" (if with_lua then "-DLUAPATH=${placeholder "out"}/lib/lua" else "-DBUILD_LUA=OFF") ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2023-02-16 17:41:37 +00:00
|
|
|
buildInputs = [ json_c ] ++ lib.optional with_lua lua5_1;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "C utility functions for OpenWrt";
|
|
|
|
homepage = "https://git.openwrt.org/?p=project/libubox.git;a=summary";
|
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ fpletz ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "jshn";
|
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|