1{
2 zstd,
3 lib,
4 fetchzip,
5 stdenvNoCC,
6}:
7stdenvNoCC.mkDerivation (final: {
8 name = "brcm-mac-firmware";
9
10 src = fetchzip {
11 nativeBuildInputs = [ zstd ];
12 stripRoot = false;
13 url = "https://mirror.funami.tech/arch-mact2/os/x86_64/apple-bcm-firmware-14.0-1-any.pkg.tar.zst";
14 hash = "sha256-7HFXStpTkBG8wujsO8OTm5x+h17mqRiGSrS/Srv49Yg=";
15 };
16
17 dontBuild = true;
18 dontConfigure = true; # don't do unnecessary stuff.
19
20 installPhase = ''
21 finalDir="$out/lib/firmware"
22 mkdir -p "$finalDir"
23 cp -r ${final.src}/usr/lib/firmware/brcm "$finalDir"
24 '';
25
26 meta = {
27 description = "Collection of Wi-Fi and Bluetooth firmware files for Apple Mac devices.";
28 license = lib.licenses.unfree;
29 maintainers = with lib.maintainers; [ soopyc ];
30 platforms = lib.platforms.linux;
31 };
32})