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
75 lines
1.5 KiB
Nix
75 lines
1.5 KiB
Nix
{
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
lib,
|
|
cmake,
|
|
pkg-config,
|
|
pcsclite,
|
|
curl,
|
|
libmbim,
|
|
libqmi,
|
|
withDrivers ? true,
|
|
withLibeuicc ? true,
|
|
withMbim ? true,
|
|
withQmi ? true,
|
|
nix-update-script,
|
|
}:
|
|
|
|
let
|
|
inherit (lib) optional;
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "lpac";
|
|
version = "2.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "estkme-group";
|
|
repo = "lpac";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-ALne5sHB6ff7cHAWe0rFwpP/Yz4EhZBiOrgdM2B8+OE=";
|
|
};
|
|
|
|
env.LPAC_VERSION = finalAttrs.version;
|
|
|
|
patches = [ ./lpac-version.patch ];
|
|
|
|
cmakeFlags = [
|
|
(lib.cmakeBool "LPAC_DYNAMIC_DRIVERS" withDrivers)
|
|
(lib.cmakeBool "LPAC_DYNAMIC_LIBEUICC" withLibeuicc)
|
|
(lib.cmakeBool "LPAC_WITH_APDU_MBIM" withMbim)
|
|
(lib.cmakeBool "LPAC_WITH_APDU_QMI" withQmi)
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
curl
|
|
pcsclite
|
|
]
|
|
++ optional withMbim libmbim
|
|
++ optional withQmi libqmi;
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/share/doc/lpac
|
|
cp -vr $src/docs/* $out/share/doc/lpac
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { attrPath = finalAttrs.pname; };
|
|
};
|
|
|
|
meta = {
|
|
description = "C-based eUICC LPA";
|
|
homepage = "https://github.com/estkme-group/lpac";
|
|
mainProgram = "lpac";
|
|
changelog = "https://github.com/estkme-group/lpac/releases/tag/v${finalAttrs.version}";
|
|
license = [ lib.licenses.agpl3Plus ] ++ optional withLibeuicc lib.licenses.lgpl21Plus;
|
|
maintainers = with lib.maintainers; [ sarcasticadmin ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
})
|