```nix
{stdenv, cmake, ninja, qtbase, qtx11extras, git, pkgconfig, xorg, makeQtWrapper}:

stdenv.mkDerivation rec {
  name = "renderdoc-${version}";
  version = "0.32";

  buildInputs = [ cmake ninja qtbase git pkgconfig xorg.libpthreadstubs xorg.libXdmcp qtx11extras ];
  nativeBuildInputs = [ makeQtWrapper ];
  preFixup = ''
    wrapQtProgram $out/bin/renderdoc
  '';
  preConfigure = "cmakeFlags=\"-DVULKAN_LAYER_FOLDER=$out/share/vulkan/implicit_layer.d/\"";
  src = builtins.filterSource
    (path: type: type != "directory" || baseNameOf path != "build")
    ./.;
  enableParallelBuilding = true;
}
```