mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 02:44:30 +00:00
Fix cross-compilation for fwupd (#351182)
This commit is contained in:
commit
27dbbeec4f
26
pkgs/by-name/fw/fwupd/build-time-python.nix
Normal file
26
pkgs/by-name/fw/fwupd/build-time-python.nix
Normal file
@ -0,0 +1,26 @@
|
||||
# Python environment that needs to be able to run the following:
|
||||
# https://github.com/fwupd/fwupd/blob/f8b5ed554ce3d5e7a016e6e97f0a03e48e510ddb/plugins/uefi-capsule/meson.build#L73
|
||||
|
||||
{
|
||||
lib,
|
||||
glib,
|
||||
pango,
|
||||
python3,
|
||||
harfbuzz,
|
||||
}:
|
||||
|
||||
let
|
||||
giTypelibPath = lib.makeSearchPathOutput "out" "lib/girepository-1.0" [
|
||||
harfbuzz
|
||||
pango
|
||||
glib
|
||||
];
|
||||
in
|
||||
(python3.withPackages (p: [
|
||||
p.jinja2
|
||||
p.pygobject3
|
||||
p.setuptools
|
||||
])).override
|
||||
{
|
||||
makeWrapperArgs = [ "--set GI_TYPELIB_PATH ${giTypelibPath}" ];
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
# Updating? Keep $out/etc synchronized with passthru keys
|
||||
|
||||
{
|
||||
pkgsBuildBuild,
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
@ -22,6 +23,7 @@
|
||||
elfutils,
|
||||
valgrind,
|
||||
meson,
|
||||
mesonEmulatorHook,
|
||||
libuuid,
|
||||
ninja,
|
||||
gnutls,
|
||||
@ -57,14 +59,6 @@
|
||||
}:
|
||||
|
||||
let
|
||||
python = python3.withPackages (
|
||||
p: with p; [
|
||||
jinja2
|
||||
pygobject3
|
||||
setuptools
|
||||
]
|
||||
);
|
||||
|
||||
isx86 = stdenv.hostPlatform.isx86;
|
||||
|
||||
# Dell isn't supported on Aarch64
|
||||
@ -165,30 +159,39 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
./efi-app-path.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
# required for firmware zipping
|
||||
ensureNewerSourcesForZipFilesHook
|
||||
meson
|
||||
ninja
|
||||
gi-docgen
|
||||
pkg-config
|
||||
gobject-introspection
|
||||
gettext
|
||||
shared-mime-info
|
||||
valgrind
|
||||
gnutls
|
||||
protobufc # for protoc
|
||||
python
|
||||
wrapGAppsNoGuiHook
|
||||
vala
|
||||
strictDeps = true;
|
||||
|
||||
depsBuildBuild = [
|
||||
pkg-config # for finding build-time dependencies
|
||||
(pkgsBuildBuild.callPackage ./build-time-python.nix { })
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
json-glib
|
||||
];
|
||||
|
||||
nativeBuildInputs =
|
||||
[
|
||||
ensureNewerSourcesForZipFilesHook # required for firmware zipping
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
gettext
|
||||
shared-mime-info
|
||||
valgrind
|
||||
protobufc # for protoc
|
||||
wrapGAppsNoGuiHook
|
||||
vala
|
||||
gobject-introspection
|
||||
gi-docgen
|
||||
]
|
||||
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||
mesonEmulatorHook
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
gnutls
|
||||
polkit
|
||||
libxmlb
|
||||
gusb
|
||||
|
Loading…
Reference in New Issue
Block a user