anchor.diff:    ];
   
     installPhase = ''
  +    runHook preInstall
  +
       cd ..
   
       mkdir -p $out/share/applications
  
positive.code: 
      mkdir -p $out/share/pixmaps
      cp -v resources/icons/qgroundcontrol.png $out/share/pixmaps
    '';
  
    postInstall = ''
      wrapProgram "$out/bin/qgroundcontrol" \
        --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"
    '';
  
    # TODO: package mavlink so we can build from a normal source tarball
    src = fetchgit {
      url = "https://github.com/mavlink/qgroundcontrol.git";
      rev = "v${version}";
      sha256 = "05zy6w9lwwh254wa8c6wysa67kk0flywcvipii9b1rmy47slflhs";
      fetchSubmodules = true;
    };
  
  
negative.code: { lib, mkDerivation, fetchgit, SDL2
  , qtbase, qtcharts, qtlocation, qtserialport, qtsvg, qtquickcontrols2
  , qtgraphicaleffects, qtspeech, qtx11extras, qmake, qttools
  , gst_all_1, wayland, pkgconfig
  }:
  
  mkDerivation rec {
    pname = "qgroundcontrol";
    version = "4.0.8";
  
    qtInputs = [
      qtbase qtcharts qtlocation qtserialport qtsvg qtquickcontrols2
      qtgraphicaleffects qtspeech qtx11extras
    ];
  
    gstInputs = with gst_all_1; [
      gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad wayland
    ];
  
    enableParallelBuilding = true;
    buildInputs = [ SDL2 ] ++ gstInputs ++ qtInputs;
    nativeBuildInputs = [ pkgconfig qmake qttools ];
  
    preConfigure = ''
      mkdir build
      cd build
    '';
  
    qmakeFlags = [
      # Default install tries to copy Qt files into package
  