Skip to content

Commit

Permalink
dtbloader: init at 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
liberodark committed Jan 3, 2025
1 parent 5319145 commit 397da94
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions pkgs/by-name/dt/dtbloader/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
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" ];

buildPhase = ''
make -j$NIX_BUILD_CORES
'';

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/${version}";
license = lib.licenses.bsd3;
platforms = [
"aarch64-linux"
];
maintainers = with lib.maintainers; [ liberodark ];
mainProgram = "dtbloader.efi";
};
})

0 comments on commit 397da94

Please sign in to comment.