1{ lib, stdenvNoCC, fetchFromGitHub }:
2
3stdenvNoCC.mkDerivation rec {
4 # NOTE: this should be updated with linux_rpi
5 pname = "raspberrypi-firmware";
6 version = "1.20230405";
7
8 src = fetchFromGitHub {
9 owner = "raspberrypi";
10 repo = "firmware";
11 rev = version;
12 hash = "sha256-UtUd1MbsrDFxd/1C3eOAMDKPZMx+kSMFYOJP+Kc6IU8=";
13 };
14
15 installPhase = ''
16 mkdir -p $out/share/raspberrypi/
17 mv boot "$out/share/raspberrypi/"
18 '';
19
20 dontConfigure = true;
21 dontBuild = true;
22 dontFixup = true;
23
24 meta = with lib; {
25 description = "Firmware for the Raspberry Pi board";
26 homepage = "https://github.com/raspberrypi/firmware";
27 license = licenses.unfreeRedistributableFirmware; # See https://github.com/raspberrypi/firmware/blob/master/boot/LICENCE.broadcom
28 maintainers = with maintainers; [ dezgeg ];
29 # Hash mismatch on source, mystery.
30 # Maybe due to https://github.com/NixOS/nix/issues/847
31 broken = stdenvNoCC.isDarwin;
32 };
33}