fwupd: fix build when cross compiling
This commit is contained in:
parent
6b83f7004c
commit
7fa27c0752
pkgs/by-name/fw/fwupd
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
|
# Updating? Keep $out/etc synchronized with passthru keys
|
||||||
|
|
||||||
{
|
{
|
||||||
|
pkgsBuildBuild,
|
||||||
stdenv,
|
stdenv,
|
||||||
lib,
|
lib,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
@ -22,6 +23,7 @@
|
|||||||
elfutils,
|
elfutils,
|
||||||
valgrind,
|
valgrind,
|
||||||
meson,
|
meson,
|
||||||
|
mesonEmulatorHook,
|
||||||
libuuid,
|
libuuid,
|
||||||
ninja,
|
ninja,
|
||||||
gnutls,
|
gnutls,
|
||||||
@ -57,14 +59,6 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
python = python3.withPackages (
|
|
||||||
p: with p; [
|
|
||||||
jinja2
|
|
||||||
pygobject3
|
|
||||||
setuptools
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
isx86 = stdenv.hostPlatform.isx86;
|
isx86 = stdenv.hostPlatform.isx86;
|
||||||
|
|
||||||
# Dell isn't supported on Aarch64
|
# Dell isn't supported on Aarch64
|
||||||
@ -170,30 +164,39 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
strictDeps = true;
|
||||||
# required for firmware zipping
|
|
||||||
ensureNewerSourcesForZipFilesHook
|
depsBuildBuild = [
|
||||||
meson
|
pkg-config # for finding build-time dependencies
|
||||||
ninja
|
(pkgsBuildBuild.callPackage ./build-time-python.nix { })
|
||||||
gi-docgen
|
|
||||||
pkg-config
|
|
||||||
gobject-introspection
|
|
||||||
gettext
|
|
||||||
shared-mime-info
|
|
||||||
valgrind
|
|
||||||
gnutls
|
|
||||||
protobufc # for protoc
|
|
||||||
python
|
|
||||||
wrapGAppsNoGuiHook
|
|
||||||
vala
|
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
json-glib
|
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 =
|
buildInputs =
|
||||||
[
|
[
|
||||||
|
gnutls
|
||||||
polkit
|
polkit
|
||||||
libxmlb
|
libxmlb
|
||||||
gusb
|
gusb
|
||||||
|
Loading…
Reference in New Issue
Block a user