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";
|
2021-04-05 15:23:46 +00:00
|
|
|
version = "2021-01-28";
|
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";
|
2021-04-05 15:23:46 +00:00
|
|
|
rev = "83938f78ca2d5a0ffe0c223bb96d72ccc7b71ca5";
|
|
|
|
sha256 = "1l4zz86y2hjyvdwjy75abyjwh3wqknd71y3vh1iw5nd0hws8ranp";
|
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 = ''
|
|
|
|
mkdir -p "$out/lib/firmware/brcm"
|
|
|
|
|
|
|
|
# Wifi firmware
|
|
|
|
for filename in firmware-nonfree/brcm/brcmfmac434??-sdio.*; do
|
|
|
|
cp "$filename" "$out/lib/firmware/brcm"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Bluetooth firmware
|
|
|
|
cp bluez-firmware/broadcom/*.hcd "$out/lib/firmware/brcm"
|
|
|
|
'';
|
|
|
|
|
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHashAlgo = "sha256";
|
2021-04-05 15:23:46 +00:00
|
|
|
outputHash = "0a54gyrq6jfxxvimaa4yjfiyfwf7wv58v0a32l74yrzyarr3ldby";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|