mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
38 lines
1.1 KiB
Nix
38 lines
1.1 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";
|
|
};
|
|
}
|