15 stdenvNoCC.mkDerivation (finalAttrs: {
16 pname = "raspberrypi-eeprom";
17 version = "2024.11.12-2712";
19 src = fetchFromGitHub {
20 owner = "raspberrypi";
22 rev = "refs/tags/v${finalAttrs.version}";
23 hash = "sha256-6HyaEdMEBIFilZJJ9yPBHqdp0g+kLbbpr/5RsLZLI3U=";
26 buildInputs = [ python3 ];
27 nativeBuildInputs = [ makeWrapper ];
30 # Don't try to verify md5 signatures from /var/lib/dpkg and
31 # fix path to the configuration.
32 substituteInPlace rpi-eeprom-update \
33 --replace 'IGNORE_DPKG_CHECKSUMS=''${LOCAL_MODE}' 'IGNORE_DPKG_CHECKSUMS=1' \
34 --replace '/etc/default' '/etc'
39 cp rpi-eeprom-config rpi-eeprom-update rpi-eeprom-digest "$out/bin"
41 mkdir -p "$out/lib/firmware/raspberrypi"
42 for dirname in firmware-*; do
43 dirname_suffix="''${dirname/#firmware-}"
44 cp -rP "$dirname" "$out/lib/firmware/raspberrypi/bootloader-$dirname_suffix"
49 patchShebangs $out/bin
50 for i in rpi-eeprom-update rpi-eeprom-config; do
51 wrapProgram $out/bin/$i \
52 --set FIRMWARE_ROOT "$out/lib/firmware/raspberrypi/bootloader" \
53 ${lib.optionalString stdenvNoCC.hostPlatform.isAarch64 "--set VCMAILBOX ${libraspberrypi}/bin/vcmailbox"} \
65 ++ lib.optionals stdenvNoCC.hostPlatform.isAarch64 [
74 description = "Installation scripts and binaries for the closed sourced Raspberry Pi 4 and 5 bootloader EEPROMs";
75 homepage = "https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-4-boot-eeprom";
76 license = with licenses; [
78 unfreeRedistributableFirmware
80 maintainers = with maintainers; [
84 platforms = platforms.linux;