lpac: 2.2.1 -> 2.3.0, cleanups, add docs, add qmi + mbim support (#435574)

authored by Florian Klink and committed by GitHub 753c351b 1a08a8b3

+21 -6
+21 -6
pkgs/by-name/lp/lpac/package.nix
··· 6 6 pkg-config, 7 7 pcsclite, 8 8 curl, 9 + libmbim, 10 + libqmi, 9 11 withDrivers ? true, 10 12 withLibeuicc ? true, 13 + withMbim ? true, 14 + withQmi ? true, 11 15 nix-update-script, 12 16 }: 13 17 ··· 17 21 stdenv.mkDerivation (finalAttrs: { 18 22 19 23 pname = "lpac"; 20 - version = "2.2.1"; 24 + version = "2.3.0"; 21 25 22 26 src = fetchFromGitHub { 23 27 owner = "estkme-group"; 24 28 repo = "lpac"; 25 29 tag = "v${finalAttrs.version}"; 26 - hash = "sha256-dxoYuX3dNj4piXQBqU4w1ICeyOGid35c+6ZITQiN6wA="; 30 + hash = "sha256-ALne5sHB6ff7cHAWe0rFwpP/Yz4EhZBiOrgdM2B8+OE="; 27 31 }; 28 32 29 33 env.LPAC_VERSION = finalAttrs.version; 30 34 31 35 patches = [ ./lpac-version.patch ]; 32 36 33 - cmakeFlags = 34 - optional withDrivers "-DLPAC_DYNAMIC_DRIVERS=on" 35 - ++ optional withLibeuicc "-DLPAC_DYNAMIC_LIBEUICC=on"; 37 + cmakeFlags = [ 38 + (lib.cmakeBool "LPAC_DYNAMIC_DRIVERS" withDrivers) 39 + (lib.cmakeBool "LPAC_DYNAMIC_LIBEUICC" withLibeuicc) 40 + (lib.cmakeBool "LPAC_WITH_APDU_MBIM" withMbim) 41 + (lib.cmakeBool "LPAC_WITH_APDU_QMI" withQmi) 42 + ]; 36 43 37 44 nativeBuildInputs = [ 38 45 cmake ··· 42 49 buildInputs = [ 43 50 curl 44 51 pcsclite 45 - ]; 52 + ] 53 + ++ optional withMbim libmbim 54 + ++ optional withQmi libqmi; 55 + 56 + postInstall = '' 57 + mkdir -p $out/share/doc/lpac 58 + cp -vr $src/docs/* $out/share/doc/lpac 59 + ''; 46 60 47 61 passthru = { 48 62 updateScript = nix-update-script { attrPath = finalAttrs.pname; }; ··· 52 66 description = "C-based eUICC LPA"; 53 67 homepage = "https://github.com/estkme-group/lpac"; 54 68 mainProgram = "lpac"; 69 + changelog = "https://github.com/estkme-group/lpac/releases/tag/v${finalAttrs.version}"; 55 70 license = [ lib.licenses.agpl3Plus ] ++ optional withLibeuicc lib.licenses.lgpl21Plus; 56 71 maintainers = with lib.maintainers; [ sarcasticadmin ]; 57 72 platforms = lib.platforms.all;