Files
nix-config/packages/raspberrypi/raspberrypifw/default.nix
mjallen18 94c3d6d6ff packages
2026-01-21 21:41:01 -06:00

41 lines
1.1 KiB
Nix

{
lib,
stdenvNoCC,
namespace,
}:
let
inherit (lib.trivial) importJSON;
inherit (lib.${namespace}) versioning;
versionSpec = importJSON ./version.json;
selected = versioning.selectVariant versionSpec null null;
vars = selected.variables or {};
sources = versioning.mkAllSources selected;
in
stdenvNoCC.mkDerivation {
# NOTE: this should be updated with linux_rpi
pname = "raspberrypi-firmware";
version = vars.version;
src = sources.firmware;
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;
};
}