fwupd: correct aarch64 support

This commit is contained in:
worldofpeace 2019-08-06 22:00:45 -04:00
parent 6f86c002dd
commit 441f2525ba

View file

@ -17,6 +17,18 @@ let
fontsConf = makeFontsConf {
fontDirectories = [ freefont_ttf ];
};
isx86 = stdenv.isx86_64 || stdenv.isi686;
# Dell isn't supported on Aarch64
haveDell = isx86;
# only redfish for x86_64
haveRedfish = stdenv.isx86_64;
# Currently broken on Aarch64
haveFlashrom = isx86;
in stdenv.mkDerivation rec {
pname = "fwupd";
version = "1.2.8";
@ -32,11 +44,12 @@ in stdenv.mkDerivation rec {
meson ninja gtk-doc pkgconfig gobject-introspection intltool shared-mime-info
valgrind gcab docbook_xml_dtd_43 docbook_xsl help2man libxslt python wrapGAppsHook vala
];
buildInputs = [
polkit libxmlb gusb sqlite libarchive libsoup elfutils libsmbios gnu-efi libyaml
libgudev colord gpgme libuuid gnutls glib-networking efivar json-glib umockdev
bash-completion cairo freetype fontconfig pango
];
polkit libxmlb gusb sqlite libarchive libsoup elfutils gnu-efi libyaml
libgudev colord gpgme libuuid gnutls glib-networking json-glib umockdev
bash-completion cairo freetype fontconfig pango efivar
] ++ stdenv.lib.optionals haveDell [ libsmbios ];
patches = [
./fix-paths.patch
@ -71,11 +84,14 @@ in stdenv.mkDerivation rec {
# /etc/os-release not available in sandbox
# doCheck = true;
preFixup = ''
preFixup = let
binPath = [ efibootmgr bubblewrap tpm2-tools ] ++ stdenv.lib.optional haveFlashrom flashrom;
in
''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
# See programs reached with fu_common_find_program_in_path in source
--prefix PATH : "${stdenv.lib.makeBinPath [ flashrom efibootmgr bubblewrap tpm2-tools ]}"
--prefix PATH : "${stdenv.lib.makeBinPath binPath}"
)
'';
@ -89,6 +105,13 @@ in stdenv.mkDerivation rec {
"--localstatedir=/var"
"--sysconfdir=/etc"
"-Dsysconfdir_install=${placeholder "out"}/etc"
] ++ stdenv.lib.optionals (!haveDell) [
"-Dplugin_dell=false"
"-Dplugin_synaptics=false"
] ++ stdenv.lib.optionals (!haveRedfish) [
"-Dplugin_redfish=false"
] ++ stdenv.lib.optionals (!haveFlashrom) [
"-Dplugin_flashrom=false"
];
# TODO: We need to be able to override the directory flags from meson setup hook