Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitLab 4, meson 5, ninja 6, pkg-config 7, glib 8, python3 9, help2man 10, systemd 11, bash-completion 12, bash 13, buildPackages 14, withIntrospection ? stdenv.hostPlatform.emulatorAvailable buildPackages 15, withDocs ? stdenv.hostPlatform == stdenv.buildPlatform 16, gobject-introspection 17}: 18 19stdenv.mkDerivation rec { 20 pname = "libmbim"; 21 version = "1.28.4"; 22 23 outputs = [ "out" "dev" ] 24 ++ lib.optionals withDocs [ "man" ]; 25 26 src = fetchFromGitLab { 27 domain = "gitlab.freedesktop.org"; 28 owner = "mobile-broadband"; 29 repo = "libmbim"; 30 rev = version; 31 hash = "sha256-aaYjvJ2OMTzkUyqWCyHdmsKJ3VGqBmKQzb1DWK/1cPU="; 32 }; 33 34 mesonFlags = [ 35 "-Dudevdir=${placeholder "out"}/lib/udev" 36 (lib.mesonBool "introspection" withIntrospection) 37 (lib.mesonBool "man" withDocs) 38 ]; 39 40 strictDeps = true; 41 42 nativeBuildInputs = [ 43 meson 44 ninja 45 pkg-config 46 python3 47 ] ++ lib.optionals withDocs [ 48 help2man 49 ] ++ lib.optionals withIntrospection [ 50 gobject-introspection 51 ]; 52 53 buildInputs = [ 54 glib 55 systemd 56 bash-completion 57 bash 58 ]; 59 60 doCheck = true; 61 62 postPatch = '' 63 patchShebangs \ 64 build-aux/mbim-codegen/mbim-codegen 65 ''; 66 67 meta = with lib; { 68 homepage = "https://www.freedesktop.org/wiki/Software/libmbim/"; 69 description = "Library for talking to WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol"; 70 changelog = "https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/raw/${version}/NEWS"; 71 maintainers = teams.freedesktop.members; 72 platforms = platforms.linux; 73 license = licenses.gpl2Plus; 74 }; 75}