{ 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 = [ ]; }; }