anchor.diff:      libdrm
       libelf
       libffi
  +    libglvnd
       libomxil-bellagio
       # FIXME: recursive dependency
       #libva
       libvdpau
  -    #libxml2Python
       llvm
  +    openssl
       systemd_lib
       wayland
       xorg.dri2proto
       xorg.dri3proto
       xorg.glproto
  +    xorg.libpthreadstubs
       xorg.libX11
       xorg.libxcb
       xorg.libXdamage
  
positive.code: 
    postPatch = ''
      patchShebangs .
    '' +
    /* Set runtime driver search path */ ''
      sed -i src/egl/main/egldriver.c \
        -e 's,_EGL_DRIVER_SEARCH_DIR,"${driverSearchPath}",'
  
    '' +
    /* Substitute the path to udev */ ''
      grep -q '@udev@' src/loader/loader.c
      sed -i 's,@udev@,${systemd_lib},g' src/loader/loader.c
    '';
  
    configureFlags = [
      "--sysconfdir=/etc"
      "--localstatedir=/var"
      "--enable-largefile"
      "--disable-debug"
      # slight performance degradation, enable only for grsec
      (enFlag "glx-rts" grsecEnabled null)
      "--disable-mangling"
      (enFlag "texture-float" enableTextureFloats null)
      "--enable-asm"
      # TODO: add selinux support
      "--disable-selinux"
      "--enable-opengl"
      "--enable-gles1"
  
negative.code:       "https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz"
      ];
      allowHashOutput = false;  # Provided by upstream directly
      sha256 = "bab24fb79f78c876073527f515ed871fc9c81d816f66c8a0b051d8d653896389";
    };
  
    nativeBuildInputs = [
      autoreconfHook
      bison
      flex
      gettext
      intltool
      python2Packages.python
      python2Packages.Mako
      xorg.makedepend
    ];
  