Files
nix-config/packages/raspberrypi/uefi-rpi4/default.nix
2026-01-21 12:53:13 -06:00

45 lines
975 B
Nix

{
lib,
stdenvNoCC,
fetchzip,
pkgs,
}:
let
inherit (lib.trivial) importJSON;
versionSpec = importJSON ./version.json;
versioning = import ../../../lib/versioning.nix { inherit lib pkgs; };
selected = versioning.selectVariant versionSpec null null;
vars = selected.variables or {};
sources = versioning.mkAllSources selected;
in
stdenvNoCC.mkDerivation rec {
pname = "uefi-rpi4";
version = vars.version;
src = sources.firmware;
sourceRoot = ".";
dontBuild = true;
# Firmware blobs do not need fixing and should not be modified
dontFixup = true;
installPhase = ''
runHook preInstall
mkdir -p "$out"
cp -rv "${src}/." "$out"
# cp -rv "${src}/RPI_EFI.fd" "$out"
# cp -rv "${src}/config.txt" "$out"
runHook postInstall
'';
meta = with lib; {
description = "RPI4 UEFI firmware";
homepage = "https://github.com/pftf/RPi4";
platforms = platforms.linux;
maintainers = with maintainers; [ ];
};
}