2017-10-01 19:33:52 +00:00
|
|
|
{ stdenv, lib, fetchgit, cmake, perl, libubox, json_c }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2020-02-12 00:58:00 +00:00
|
|
|
pname = "uqmi";
|
2023-11-28 22:56:32 +00:00
|
|
|
version = "unstable-2023-10-30";
|
2017-10-01 19:33:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.openwrt.org/project/uqmi.git";
|
2023-11-28 22:56:32 +00:00
|
|
|
rev = "eea292401c388a4eb59c0caf5d00aa046c6059f4";
|
|
|
|
hash = "sha256-Uz5GjGcSKatbii09CsvzsYMz8Vm+Am4RUeCZuFIK1Ag=";
|
2017-10-01 19:33:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace data/gen-header.pl --replace /usr/bin/env ""
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake perl ];
|
|
|
|
buildInputs = [ libubox json_c ];
|
|
|
|
|
2023-02-20 15:36:06 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
|
2023-02-05 13:56:47 +00:00
|
|
|
# Needed with GCC 12 but breaks on darwin (with clang) or older gcc
|
2022-12-23 16:57:29 +00:00
|
|
|
"-Wno-error=dangling-pointer"
|
2023-11-28 22:56:32 +00:00
|
|
|
"-Wno-error=maybe-uninitialized"
|
2023-02-20 15:36:06 +00:00
|
|
|
]);
|
2022-12-23 16:57:29 +00:00
|
|
|
|
2017-10-01 19:33: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;
|
2023-11-24 03:45:37 +00:00
|
|
|
maintainers = with maintainers; [ fpletz mkg20001 ];
|
2017-10-01 19:33:52 +00:00
|
|
|
};
|
|
|
|
}
|