10 with_ustream_ssl ? false,
16 version = "unstable-2023-12-18";
19 url = "https://git.openwrt.org/project/libubox.git";
20 rev = "6339204c212b2c3506554a8842030df5ec6fe9c6";
21 hash = "sha256-QgpORITt6MYgfzUpaI2T0Ge2a0iVHjDhdYI/nZ2HbJ8=";
25 "-DBUILD_EXAMPLES=OFF"
26 (if with_lua then "-DLUAPATH=${placeholder "out"}/lib/lua" else "-DBUILD_LUA=OFF")
34 [ json_c ] ++ lib.optional with_lua lua5_1 ++ lib.optional with_ustream_ssl ustream-ssl;
36 postInstall = lib.optionalString with_ustream_ssl ''
37 for fin in $(find ${ustream-ssl} -type f); do
38 fout="''${fin/"${ustream-ssl}"/"''${out}"}"
43 env.NIX_CFLAGS_COMPILE = toString (
44 lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
45 "-Wno-error=gnu-folding-constant"
50 description = "C utility functions for OpenWrt";
51 homepage = "https://git.openwrt.org/?p=project/libubox.git;a=summary";
52 license = licenses.isc;
53 maintainers = with maintainers; [
58 platforms = platforms.all;