nixpkgs/pkgs/by-name/fw/fwupd-efi/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

58 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 = [ ];
license = licenses.lgpl21Plus;
platforms = platforms.linux;
};
}