apple/t2: add Wi-Fi and Bluetooth firmware option

This commit is contained in:
mkorje
2025-03-17 12:40:06 +11:00
committed by mergify[bot]
parent e8c83f0759
commit 36d0027ef4
6 changed files with 354 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
callPackage,
dmg2img,
}:
let
macrecovery = callPackage ./macrecovery.nix { };
in
{
name,
boardId,
mlb,
osType,
hash,
}:
stdenvNoCC.mkDerivation {
name = name;
dontUnpack = true;
nativeBuildInputs = [
macrecovery
dmg2img
];
buildPhase = ''
macrecovery download -o . -b ${boardId} -m ${mlb} -os ${osType}
dmg2img -s BaseSystem.dmg fw.img
'';
installPhase = ''
cp fw.img $out
'';
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = hash;
}