anchor.diff:      pkg-config
       qmake
       qttools
  +    wrapQtAppsHook
     ];
   
     buildInputs = [
       zlib
       libusb1
       libGL
  -    wrapQtAppsHook
   
       qtbase
       qt3d
  
positive.code:     qtwayland
    ];
  
    preBuild = ''
      substituteInPlace qflipper_common.pri \
          --replace 'GIT_VERSION = unknown' 'GIT_VERSION = "${version}"' \
          --replace 'GIT_TIMESTAMP = 0' 'GIT_TIMESTAMP = ${timestamp}' \
          --replace 'GIT_COMMIT = unknown' 'GIT_COMMIT = "${commit}"'
      cat qflipper_common.pri
  
    '';
  
    installPhase = ''
      runHook preInstall
  
      mkdir -p $out/bin
      ${lib.optionalString stdenv.isLinux ''
        install -Dm755 qFlipper $out/bin/qFlipper
      ''}
      ${lib.optionalString stdenv.isDarwin ''
        install -Dm755 qFlipper.app/Contents/MacOS/qFlipper $out/bin/qFlipper
      ''}
      cp qFlipperTool $out/bin
  
      mkdir -p $out/share/applications
      cp installer-assets/appimage/qFlipper.desktop $out/share/applications
  
      mkdir -p $out/share/icons
      cp application/assets/icons/qFlipper.png $out/share/icons
  
      mkdir -p $out/etc/udev/rules.d
      tee $out/etc/udev/rules.d/42-flipperzero.rules << EOF
      ${udev_rules}
      EOF
  
      runHook postInstall
    '';
  
    meta = with lib; {
  
negative.code: , qtwayland
  }:
  let
    version = "1.0.1";
    timestamp = "99999999999";
    commit = "nix-${version}";
    hash = "sha256-vHBlrtQ06kjjXXGL/jSdpAPHgqb7Vn1c6jXZVXwxHPQ=";
  
    udev_rules = ''
      #Flipper Zero serial port
  