2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "raspberrypi-wireless-firmware";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "2021-11-02";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
srcs = [
|
|
|
|
(fetchFromGitHub {
|
|
|
|
name = "bluez-firmware";
|
|
|
|
owner = "RPi-Distro";
|
|
|
|
repo = "bluez-firmware";
|
2021-04-05 15:23:46 +00:00
|
|
|
rev = "e7fd166981ab4bb9a36c2d1500205a078a35714d";
|
|
|
|
sha256 = "1dkg8mzn7n4afi50ibrda2s33nw2qj52jjjdv9w560q601gms47b";
|
2020-04-24 23:36:52 +00:00
|
|
|
})
|
|
|
|
(fetchFromGitHub {
|
|
|
|
name = "firmware-nonfree";
|
|
|
|
owner = "RPi-Distro";
|
|
|
|
repo = "firmware-nonfree";
|
2022-03-05 16:20:37 +00:00
|
|
|
rev = "54ffdd6e2ea6055d46656b78e148fe7def3ec9d8";
|
|
|
|
sha256 = "4WTrs/tUyOugufRrrh0qsEmhPclQD64ypYysxsnOyS8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
# Firmware blobs do not need fixing and should not be modified
|
|
|
|
dontFixup = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-08-06 21:57:35 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p "$out/lib/firmware/brcm"
|
|
|
|
|
|
|
|
# Wifi firmware
|
2022-03-05 16:20:37 +00:00
|
|
|
shopt -s extglob
|
|
|
|
for filename in firmware-nonfree/brcm/brcmfmac434??{,s}-sdio.*; do
|
2020-04-24 23:36:52 +00:00
|
|
|
cp "$filename" "$out/lib/firmware/brcm"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Bluetooth firmware
|
|
|
|
cp bluez-firmware/broadcom/*.hcd "$out/lib/firmware/brcm"
|
2021-08-06 21:57:35 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHashAlgo = "sha256";
|
2022-03-05 16:20:37 +00:00
|
|
|
outputHash = "l+7VOq7CV5QA8/FWjMBGDcxq8Qe7NFf6E2Y42htZEgE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-29 15:07:52 +00:00
|
|
|
description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3+ and Zero W";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/RPi-Distro/firmware-nonfree";
|
|
|
|
license = licenses.unfreeRedistributableFirmware;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ lopsided98 ];
|
|
|
|
};
|
|
|
|
}
|