2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub }:
|
2018-05-25 03:03:42 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "raspberrypi-wireless-firmware";
|
2021-08-03 00:35:28 +00:00
|
|
|
version = "2021-06-28";
|
2018-05-25 03:03:42 +00:00
|
|
|
|
|
|
|
srcs = [
|
2018-10-21 02:56:20 +00:00
|
|
|
(fetchFromGitHub {
|
|
|
|
name = "bluez-firmware";
|
|
|
|
owner = "RPi-Distro";
|
|
|
|
repo = "bluez-firmware";
|
2021-02-17 03:36:53 +00:00
|
|
|
rev = "e7fd166981ab4bb9a36c2d1500205a078a35714d";
|
|
|
|
sha256 = "1dkg8mzn7n4afi50ibrda2s33nw2qj52jjjdv9w560q601gms47b";
|
2018-05-25 03:03:42 +00:00
|
|
|
})
|
2018-10-21 02:56:20 +00:00
|
|
|
(fetchFromGitHub {
|
|
|
|
name = "firmware-nonfree";
|
|
|
|
owner = "RPi-Distro";
|
|
|
|
repo = "firmware-nonfree";
|
2021-08-03 00:35:28 +00:00
|
|
|
rev = "00de3194a96397c913786945ac0af1fd6fbec45b";
|
|
|
|
sha256 = "1xnr364dkiq6gmr21lcrj23hwc0g9y5qad8dm2maij647bgzp07r";
|
2018-05-25 03:03:42 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
2018-10-21 02:56:20 +00:00
|
|
|
|
2018-05-25 03:03:42 +00:00
|
|
|
dontBuild = true;
|
|
|
|
# Firmware blobs do not need fixing and should not be modified
|
|
|
|
dontFixup = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-08-03 01:52:55 +00:00
|
|
|
runHook preInstall
|
2018-05-25 03:03:42 +00:00
|
|
|
mkdir -p "$out/lib/firmware/brcm"
|
|
|
|
|
|
|
|
# Wifi firmware
|
2018-10-21 02:56:20 +00:00
|
|
|
for filename in firmware-nonfree/brcm/brcmfmac434??-sdio.*; do
|
2018-05-25 03:03:42 +00:00
|
|
|
cp "$filename" "$out/lib/firmware/brcm"
|
|
|
|
done
|
|
|
|
|
|
|
|
# Bluetooth firmware
|
2018-10-21 02:56:20 +00:00
|
|
|
cp bluez-firmware/broadcom/*.hcd "$out/lib/firmware/brcm"
|
2021-08-03 01:52:55 +00:00
|
|
|
runHook postInstall
|
2018-05-25 03:03:42 +00:00
|
|
|
'';
|
|
|
|
|
2018-07-14 18:49:01 +00:00
|
|
|
outputHashMode = "recursive";
|
|
|
|
outputHashAlgo = "sha256";
|
2021-02-17 03:36:53 +00:00
|
|
|
outputHash = "0a54gyrq6jfxxvimaa4yjfiyfwf7wv58v0a32l74yrzyarr3ldby";
|
2018-07-14 18:49:01 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-12-08 04:38:01 +00:00
|
|
|
description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3+ and Zero W";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/RPi-Distro/firmware-nonfree";
|
2018-05-25 03:03:42 +00:00
|
|
|
license = licenses.unfreeRedistributableFirmware;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ lopsided98 ];
|
|
|
|
};
|
|
|
|
}
|