libubox: init at unstable-04-09-2024

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
Raito Bezarius 2024-09-04 15:53:19 +02:00
parent 1bd9af1e9d
commit eb083bee20
2 changed files with 47 additions and 0 deletions

View file

@ -110,6 +110,7 @@ in {
swconfig = callPackage ./swconfig {}; swconfig = callPackage ./swconfig {};
systemconfig = callPackage ./systemconfig {}; systemconfig = callPackage ./systemconfig {};
tufted = callPackage ./tufted {}; tufted = callPackage ./tufted {};
libubox = callPackage ./libubox {};
uevent-watch = callPackage ./uevent-watch {}; uevent-watch = callPackage ./uevent-watch {};
usb-modeswitch = callPackage ./usb-modeswitch {}; usb-modeswitch = callPackage ./usb-modeswitch {};
writeAshScript = callPackage ./write-ash-script {}; writeAshScript = callPackage ./write-ash-script {};

46
pkgs/libubox/default.nix Normal file
View file

@ -0,0 +1,46 @@
{
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.
"-DBUILD_LUA=off"
];
meta = {
description = "";
homepage = "https://git.openwrt.org/project/libubox.git";
maintainers = with lib.maintainers; [ raitobezarius ];
mainProgram = "libubox";
platforms = lib.platforms.all;
};
}