anchor.diff:      xorg.xcbutilkeysyms
     ];
   
  -  # ac_ct_CXX must be set to random value, because then it skips some magic which does alternative searching for g++
  -  configureFlags = [
  -    "--enable-sdl"
  -    "--enable-drm"
  -    "--enable-elput"
  -    "--with-opengl=full"
  -    "--enable-image-loader-jp2k"
  -    "--enable-xinput22"
  -    "--enable-multisense"
  -    "--enable-liblz4"
  -    "--enable-systemd"
  -    "--enable-image-loader-webp"
  -    "--enable-harfbuzz"
  -    "--enable-xine"
  -    "--enable-fb"
  -    "--disable-tslib"
  -    "--with-systemdunitdir=$out/systemd/user"
  -    "ac_ct_CXX=foo"
  +  mesonFlags = [
  +    "--buildtype=release"
  +    "-D build-tests=false" # disable build tests, which are not working
  +    "-D drm=true"
  +    "-D embedded-lz4=false"
  +    "-D evas-loaders-disabler=json"
  +    "-D fb=true"
  +    "-D opengl=full"
  +    "-D sdl=true"
     ];
   
     patches = [ ./efl-elua.patch ];
   
     postPatch = ''
       patchShebangs src/lib/elementary/config_embed
  +
  +    # fix destination of systemd unit and dbus service
  +    substituteInPlace systemd-services/meson.build --replace "dep.get_pkgconfig_variable('systemduserunitdir')" "'$out/systemd/user'"
  +    substituteInPlace dbus-services/meson.build --replace "dep.get_pkgconfig_variable('session_bus_services_dir')" "'$out/share/dbus-1/services'"
     '';
   
     # bin/edje_cc creates $HOME/.run, which would break build of reverse dependencies.
  
positive.code: { stdenv, fetchurl, pkgconfig, SDL, SDL2, alsaLib, bullet, curl, dbus,
    doxygen, expat, fontconfig, freetype, fribidi, ghostscript, giflib,
    glib, gst_all_1, gtk3, harfbuzz, jbig2dec, libGL, libdrm, libinput,
    libjpeg, libpng, libpulseaudio, libraw, librsvg, libsndfile,
    libspectre, libtiff, libwebp, libxkbcommon, luajit, lz4, mesa,
    openjpeg, openssl, poppler, python27Packages, systemd, udev,
  
negative.code: 
  stdenv.mkDerivation rec {
    pname = "efl";
    version = "1.23.1";
  
    src = fetchurl {
      url = "http://download.enlightenment.org/rel/libs/${pname}/${pname}-${version}.tar.xz";
      sha256 = "0q9g4j7k10s1a8rv2ca9v9lydh7ml3zsrqvgncc4qhvdl76208nn";
    };
  
    nativeBuildInputs = [
      meson
      ninja
      gtk3
      pkgconfig
      check
    ];
  
    buildInputs = [
      SDL
      avahi
      fontconfig
      freetype
      giflib
  