2024-09-04 15:53:19 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchgit,
|
|
|
|
cmake,
|
|
|
|
lua5_1,
|
|
|
|
json_c
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libubox";
|
|
|
|
version = "unstable-2024-04-09";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.openwrt.org/project/libubox.git";
|
|
|
|
rev = "eb9bcb64185ac155c02cc1a604692c4b00368324";
|
|
|
|
hash = "sha256-5KO2E+4pcDp/pe2+vjoQDmyMwCc0yKm847U4J6HjxyA=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
lua5_1
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
lua5_1
|
|
|
|
json_c
|
|
|
|
];
|
|
|
|
|
|
|
|
# Otherwise, CMake cannot find jsoncpp?
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-I${json_c.dev}/include/json-c" "-D JSONC" ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_EXAMPLES=off"
|
|
|
|
# TODO: it explode at install phase.
|
2024-09-04 16:29:59 +02:00
|
|
|
"-DBUILD_LUA=on"
|
|
|
|
"-DLUAPATH=${placeholder "out"}/lib/lua"
|
2024-09-04 15:53:19 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "";
|
|
|
|
homepage = "https://git.openwrt.org/project/libubox.git";
|
|
|
|
maintainers = with lib.maintainers; [ raitobezarius ];
|
|
|
|
mainProgram = "libubox";
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|