nixpkgs-suyu/pkgs/os-specific/linux/firmware/raspberrypi-wireless/default.nix

54 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, fetchFromGitHub, dpkg }:
2018-05-25 05:03:42 +02:00
stdenv.mkDerivation rec {
name = "raspberrypi-wireless-firmware-${version}";
version = "2018-08-20";
2018-05-25 05:03:42 +02:00
srcs = [
(fetchFromGitHub {
name = "bluez-firmware";
owner = "RPi-Distro";
repo = "bluez-firmware";
rev = "ade2bae1aaaebede09abb8fb546f767a0e4c7804";
sha256 = "07gm76gxp5anv6paryvxcp34a86fkny8kdlzqhzcpfczzglkp6ag";
2018-05-25 05:03:42 +02:00
})
(fetchFromGitHub {
name = "firmware-nonfree";
owner = "RPi-Distro";
repo = "firmware-nonfree";
rev = "b518de45ced519e8f7a499f4778100173402ae43";
sha256 = "1d5026ic9awji6c67irpwsxpxgsc0dhn11d3abkxi2vvra1pir4g";
2018-05-25 05:03:42 +02:00
})
];
sourceRoot = ".";
2018-05-25 05:03:42 +02:00
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
2018-05-25 05:03:42 +02:00
cp "$filename" "$out/lib/firmware/brcm"
done
# Bluetooth firmware
cp bluez-firmware/broadcom/*.hcd "$out/lib/firmware/brcm"
2018-05-25 05:03:42 +02:00
'';
2018-07-14 20:49:01 +02:00
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "1s5gb00v42s5izbaw8irs1fwvhh7z9wl07czc0nkw6p91871ivb7";
2018-07-14 20:49:01 +02:00
2018-05-25 05:03:42 +02:00
meta = with stdenv.lib; {
description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3 and Zero W";
homepage = https://github.com/RPi-Distro/firmware-nonfree;
2018-05-25 05:03:42 +02:00
license = licenses.unfreeRedistributableFirmware;
platforms = platforms.linux;
maintainers = with maintainers; [ lopsided98 ];
};
}