From 6e08facfa0fb7c644fa49310da9d86a5e01c5bba Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 23 Oct 2021 12:01:00 +0300 Subject: libgudev: enable strictDeps libgudev: make gobject-introspection conditional to fix binfmt cross-compile --- pkgs/development/libraries/libgudev/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'pkgs/development/libraries') diff --git a/pkgs/development/libraries/libgudev/default.nix b/pkgs/development/libraries/libgudev/default.nix index 87061ae6559a9..6a63947c8a57f 100644 --- a/pkgs/development/libraries/libgudev/default.nix +++ b/pkgs/development/libraries/libgudev/default.nix @@ -5,9 +5,10 @@ , ninja , udev , glib -, gobject-introspection , gnome , vala +, withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform) +, gobject-introspection }: stdenv.mkDerivation rec { @@ -21,12 +22,18 @@ stdenv.mkDerivation rec { sha256 = "1al6nr492nzbm8ql02xhzwci2kwb1advnkaky3j9636jf08v41hd"; }; + strictDeps = true; + + depsBuildBuild = [ pkg-config ]; + nativeBuildInputs = [ pkg-config - gobject-introspection meson ninja vala + glib # for glib-mkenums needed during the build + ] ++ lib.optionals withIntrospection [ + gobject-introspection ]; buildInputs = [ @@ -37,8 +44,8 @@ stdenv.mkDerivation rec { mesonFlags = [ # There's a dependency cycle with umockdev and the tests fail to LD_PRELOAD anyway "-Dtests=disabled" + "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ - "-Dintrospection=disabled" "-Dvapi=disabled" ]; -- cgit 1.4.1