Skip to content

Commit

Permalink
[Backport release-24.11] dtbloader: init at 1.2.2 (#370624)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage authored Jan 4, 2025
2 parents 8f1fa8d + 55b430a commit 0196543
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions pkgs/by-name/dt/dtbloader/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
lib,
stdenv,
fetchFromGitHub,
llvmPackages,
nix-update-script,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "dtbloader";
version = "1.2.2";

src = fetchFromGitHub {
owner = "TravMurav";
repo = "dtbloader";
tag = finalAttrs.version;
hash = "sha256-5Efxi0cojhq9mqB5VMShXx/Sp4CE6Cvr1pcwnUm5zlo=";
fetchSubmodules = true;
};

nativeBuildInputs = with llvmPackages; [
clang
lld
llvm
];

# Disable hardening which adds incompatible flags like -fPIC
hardeningDisable = [ "all" ];

enableParallelBuilding = true;

installPhase = ''
runHook preInstall
mkdir -p $out/share/dtbloader/efi
cp build-aarch64/dtbloader.efi $out/share/dtbloader/efi/
mkdir -p $out/share/doc/dtbloader
cp README.md $out/share/doc/dtbloader/
runHook postInstall
'';

passthru = {
updateScript = nix-update-script { };
};

meta = {
description = "EFI driver that finds and installs DeviceTree into the UEFI configuration table";
homepage = "https://github.com/TravMurav/dtbloader";
changelog = "https://github.com/TravMurav/dtbloader/releases/tag/${finalAttrs.version}";
license = lib.licenses.bsd3;
platforms = [
# EFI file only works on aarch64 platforms
"aarch64-linux"
];
maintainers = with lib.maintainers; [ liberodark ];
};
})

0 comments on commit 0196543

Please sign in to comment.