Files
nix-config/packages/raspberrypi/raspberrypifw/default.nix
2026-04-05 19:10:23 -05:00

42 lines
1.1 KiB
Nix

{
lib,
stdenvNoCC,
namespace,
pkgs,
}:
let
inherit (lib.trivial) importJSON;
inherit (lib.${namespace}) selectVariant mkAllSources;
versionSpec = importJSON ./version.json;
selected = selectVariant versionSpec null null;
vars = selected.variables or { };
sources = mkAllSources pkgs selected;
in
stdenvNoCC.mkDerivation {
# NOTE: this should be updated with linux_rpi
pname = "raspberrypi-firmware";
inherit (vars) version;
src = sources.firmware-next;
installPhase = ''
mkdir -p $out/share/raspberrypi/
mv boot "$out/share/raspberrypi/"
'';
dontConfigure = true;
dontBuild = true;
dontFixup = true;
meta = with lib; {
description = "Firmware for the Raspberry Pi board";
homepage = "https://github.com/raspberrypi/firmware";
license = licenses.unfreeRedistributableFirmware; # See https://github.com/raspberrypi/firmware/blob/master/boot/LICENCE.broadcom
maintainers = with maintainers; [ dezgeg ];
# Hash mismatch on source, mystery.
# Maybe due to https://github.com/NixOS/nix/issues/847
broken = stdenvNoCC.hostPlatform.isDarwin;
};
}