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

46 lines
927 B
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 rec {
inherit (vars) version;
pname = "uefi-rpi4";
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 = [ ];
};
}