2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchgit, cmake, perl, libubox, json_c }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "uqmi";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "unstable-2024-01-16";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.openwrt.org/project/uqmi.git";
|
2024-01-25 14:12:00 +00:00
|
|
|
rev = "c3488b831ce6285c8107704156b9b8ed7d59deb3";
|
|
|
|
hash = "sha256-O5CeLk0WYuBs3l5xBUk9kXDRMzFvYSRoqP28KJ5Ztos=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace data/gen-header.pl --replace /usr/bin/env ""
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake perl ];
|
|
|
|
buildInputs = [ libubox json_c ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
|
2023-02-16 17:41:37 +00:00
|
|
|
# Needed with GCC 12 but breaks on darwin (with clang) or older gcc
|
|
|
|
"-Wno-error=dangling-pointer"
|
2024-01-13 08:15:51 +00:00
|
|
|
"-Wno-error=maybe-uninitialized"
|
2023-03-04 12:14:45 +00:00
|
|
|
]);
|
2023-02-16 17:41:37 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Tiny QMI command line utility";
|
|
|
|
homepage = "https://git.openwrt.org/?p=project/uqmi.git;a=summary";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.all;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ fpletz mkg20001 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|