xfce.gtk-xfce-engine: fix build when withGtk3=true (#43621)

This commit is contained in:
volth 2018-07-17 23:14:54 +00:00 committed by xeji
parent c2e4b04d29
commit 0304445996

View File

@ -1,4 +1,6 @@
{ stdenv, fetchurl, pkgconfig, intltool, gtk, withGtk3 ? false, gtk3 }:
{ stdenv, fetchurl, pkgconfig, intltool, gtk2, withGtk3 ? false, gtk3 ? null }:
assert withGtk3 -> (gtk3 != null);
stdenv.mkDerivation rec {
p_name = "gtk-xfce-engine";
@ -12,7 +14,10 @@ stdenv.mkDerivation rec {
name = "${p_name}-${ver_maj}.${ver_min}";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ intltool gtk ] ++ stdenv.lib.optional withGtk3 gtk3;
buildInputs = [ intltool gtk2 ] ++ stdenv.lib.optional withGtk3 gtk3;
# `glib-mkenums' is unhappy that some source files are not valid UTF-8
postPatch = ''find . -type f -name '*.[ch]' -exec sed -r -i 's/\xD6/O/g' {} +'';
configureFlags = stdenv.lib.optional withGtk3 "--enable-gtk3";