depot/third_party/nixpkgs/pkgs/tools/networking/uqmi/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

34 lines
1 KiB
Nix

{ stdenv, lib, fetchgit, cmake, perl, libubox, json_c }:
stdenv.mkDerivation {
pname = "uqmi";
version = "unstable-2023-10-30";
src = fetchgit {
url = "https://git.openwrt.org/project/uqmi.git";
rev = "eea292401c388a4eb59c0caf5d00aa046c6059f4";
hash = "sha256-Uz5GjGcSKatbii09CsvzsYMz8Vm+Am4RUeCZuFIK1Ag=";
};
postPatch = ''
substituteInPlace data/gen-header.pl --replace /usr/bin/env ""
patchShebangs .
'';
nativeBuildInputs = [ cmake perl ];
buildInputs = [ libubox json_c ];
env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
# Needed with GCC 12 but breaks on darwin (with clang) or older gcc
"-Wno-error=dangling-pointer"
"-Wno-error=maybe-uninitialized"
]);
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;
maintainers = with maintainers; [ fpletz mkg20001 ];
};
}