Files
nixpkgs/pkgs/by-name/uq/uqmi/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

58 lines
1.2 KiB
Nix

{
stdenv,
lib,
fetchgit,
cmake,
perl,
libubox,
json_c,
}:
stdenv.mkDerivation {
pname = "uqmi";
version = "unstable-2024-01-16";
src = fetchgit {
url = "https://git.openwrt.org/project/uqmi.git";
rev = "c3488b831ce6285c8107704156b9b8ed7d59deb3";
hash = "sha256-O5CeLk0WYuBs3l5xBUk9kXDRMzFvYSRoqP28KJ5Ztos=";
};
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"
]
++ lib.optionals stdenv.cc.isClang [
"-Wno-error=sometimes-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
];
mainProgram = "uqmi";
};
}