depot/third_party/nixpkgs/pkgs/os-specific/linux/firmware/fwupd-efi/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

57 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchurl
, fetchpatch
, pkg-config
, meson
, ninja
, gnu-efi
, python3
, python3Packages
}:
stdenv.mkDerivation rec {
pname = "fwupd-efi";
version = "1.6";
src = fetchurl {
url = "https://github.com/fwupd/fwupd-efi/releases/download/${version}/fwupd-efi-${version}.tar.xz";
hash = "sha256-r9CAWirQgafK/y71vABM46AUe1OAFejsqWY0FxaxJg4=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
python3
python3Packages.pefile
];
buildInputs = [
gnu-efi
];
postPatch = ''
patchShebangs \
efi/generate_binary.py \
efi/generate_sbat.py
'';
mesonFlags = [
"-Defi-includedir=${gnu-efi}/include/efi"
"-Defi-libdir=${gnu-efi}/lib"
"-Defi-ldsdir=${gnu-efi}/lib"
"-Defi_sbat_distro_id=nixos"
"-Defi_sbat_distro_summary=NixOS"
"-Defi_sbat_distro_pkgname=${pname}"
"-Defi_sbat_distro_version=${version}"
"-Defi_sbat_distro_url=https://search.nixos.org/packages?channel=unstable&show=fwupd-efi&from=0&size=50&sort=relevance&query=fwupd-efi"
];
meta = with lib; {
homepage = "https://fwupd.org/";
maintainers = with maintainers; [ ];
license = licenses.lgpl21Plus;
platforms = platforms.linux;
};
}