1 { stdenv, lib, fetchgit, cmake, perl, libubox, json_c }:
5 version = "unstable-2024-01-16";
8 url = "https://git.openwrt.org/project/uqmi.git";
9 rev = "c3488b831ce6285c8107704156b9b8ed7d59deb3";
10 hash = "sha256-O5CeLk0WYuBs3l5xBUk9kXDRMzFvYSRoqP28KJ5Ztos=";
14 substituteInPlace data/gen-header.pl --replace /usr/bin/env ""
18 nativeBuildInputs = [ cmake perl ];
19 buildInputs = [ libubox json_c ];
21 env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
22 # Needed with GCC 12 but breaks on darwin (with clang) or older gcc
23 "-Wno-error=dangling-pointer"
24 "-Wno-error=maybe-uninitialized"
25 ] ++ lib.optionals stdenv.cc.isClang [
26 "-Wno-error=sometimes-uninitialized"
30 description = "Tiny QMI command line utility";
31 homepage = "https://git.openwrt.org/?p=project/uqmi.git;a=summary";
32 license = licenses.gpl2Plus;
33 platforms = platforms.all;
34 maintainers = with maintainers; [ fpletz mkg20001 ];