libmanette: disable introspection if no emulator
e.g. when cross compiling from Linux to FreeBSD.
This commit is contained in:
parent
2654807c75
commit
fef0a52db9
|
@ -6,6 +6,8 @@
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, vala
|
, vala
|
||||||
, gobject-introspection
|
, gobject-introspection
|
||||||
|
, buildPackages
|
||||||
|
, withIntrospection ? stdenv.hostPlatform.emulatorAvailable buildPackages
|
||||||
, gtk-doc
|
, gtk-doc
|
||||||
, docbook-xsl-nons
|
, docbook-xsl-nons
|
||||||
, docbook_xml_dtd_43
|
, docbook_xml_dtd_43
|
||||||
|
@ -19,7 +21,7 @@ stdenv.mkDerivation rec {
|
||||||
pname = "libmanette";
|
pname = "libmanette";
|
||||||
version = "0.2.6";
|
version = "0.2.6";
|
||||||
|
|
||||||
outputs = [ "out" "dev" "devdoc" ];
|
outputs = [ "out" "dev" ] ++ lib.optional withIntrospection "devdoc";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||||
|
@ -30,23 +32,29 @@ stdenv.mkDerivation rec {
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
pkg-config
|
pkg-config
|
||||||
|
glib
|
||||||
|
] ++ lib.optionals withIntrospection [
|
||||||
vala
|
vala
|
||||||
gobject-introspection
|
gobject-introspection
|
||||||
gtk-doc
|
gtk-doc
|
||||||
docbook-xsl-nons
|
docbook-xsl-nons
|
||||||
docbook_xml_dtd_43
|
docbook_xml_dtd_43
|
||||||
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
] ++ lib.optionals (withIntrospection && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||||
mesonEmulatorHook
|
mesonEmulatorHook
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
glib
|
glib
|
||||||
libgudev
|
|
||||||
libevdev
|
libevdev
|
||||||
|
] ++ lib.optionals withIntrospection [
|
||||||
|
libgudev
|
||||||
];
|
];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Ddoc=true"
|
(lib.mesonBool "doc" withIntrospection)
|
||||||
|
(lib.mesonEnable "gudev" withIntrospection)
|
||||||
|
(lib.mesonBool "introspection" withIntrospection)
|
||||||
|
(lib.mesonBool "vapi" withIntrospection)
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
Loading…
Reference in a new issue