Merge pull request #275732 from uninsane/pr-dconf-ed-cross
dconf: enable cross compilation
This commit is contained in:
commit
e4a5140341
@ -1,6 +1,7 @@
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, meson
|
||||
, mesonEmulatorHook
|
||||
, ninja
|
||||
, python3
|
||||
, vala
|
||||
@ -13,16 +14,15 @@
|
||||
, gtk-doc
|
||||
, docbook-xsl-nons
|
||||
, docbook_xml_dtd_42
|
||||
, withDocs ? true
|
||||
}:
|
||||
let
|
||||
isCross = (stdenv.hostPlatform != stdenv.buildPlatform);
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dconf";
|
||||
version = "0.40.0";
|
||||
|
||||
outputs = [ "out" "lib" "dev" ]
|
||||
++ lib.optional (!isCross) "devdoc";
|
||||
++ lib.optional withDocs "devdoc";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
@ -38,19 +38,23 @@ stdenv.mkDerivation rec {
|
||||
glib
|
||||
docbook-xsl-nons
|
||||
docbook_xml_dtd_42
|
||||
] ++ lib.optional (!isCross) gtk-doc;
|
||||
gtk-doc
|
||||
] ++ lib.optionals (withDocs && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||
mesonEmulatorHook # gtkdoc invokes the host binary to produce documentation
|
||||
];
|
||||
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
bash-completion
|
||||
dbus
|
||||
] ++ lib.optional (!isCross) vala;
|
||||
# Vala cross compilation is broken. For now, build dconf without vapi when cross-compiling.
|
||||
vala
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"--sysconfdir=/etc"
|
||||
"-Dgtk_doc=${lib.boolToString (!isCross)}" # gtk-doc does do some gobject introspection, which doesn't yet cross-compile.
|
||||
] ++ lib.optional isCross "-Dvapi=false";
|
||||
"-Dgtk_doc=${lib.boolToString withDocs}"
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
dbus # for dbus-daemon
|
||||
|
Loading…
Reference in New Issue
Block a user