From 9982187ea4e5023983d18446345ce856cad5b3ae Mon Sep 17 00:00:00 2001 From: Vladimir Serov Date: Thu, 7 Apr 2022 01:46:18 +0400 Subject: [PATCH] qFlipper: 0.8.2 -> 1.0.1 Co-authored-by: Sandro --- pkgs/tools/misc/qflipper/default.nix | 33 ++++++++++------------------ 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/pkgs/tools/misc/qflipper/default.nix b/pkgs/tools/misc/qflipper/default.nix index d0125377763d..7f2a3d150226 100644 --- a/pkgs/tools/misc/qflipper/default.nix +++ b/pkgs/tools/misc/qflipper/default.nix @@ -21,10 +21,10 @@ , qtwayland }: let - version = "0.8.2"; + version = "1.0.1"; timestamp = "99999999999"; commit = "nix-${version}"; - hash = "sha256-BaqKlF2SZueykFhtj91McP39oXYAx+lz8eXhn5eouqg="; + hash = "sha256-vHBlrtQ06kjjXXGL/jSdpAPHgqb7Vn1c6jXZVXwxHPQ="; udev_rules = '' #Flipper Zero serial port @@ -50,13 +50,13 @@ mkDerivation { pkg-config qmake qttools + wrapQtAppsHook ]; buildInputs = [ zlib libusb1 libGL - wrapQtAppsHook qtbase qt3d @@ -70,39 +70,30 @@ mkDerivation { qtwayland ]; - preBuild = '' + qmakeFlags = [ + "DEFINES+=DISABLE_APPLICATION_UPDATES" + "CONFIG+=qtquickcompiler" + ]; + + postPatch = '' 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 - + postInstall = '' 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 qFlipper.app/Contents/MacOS/qFlipper $out/bin ''} - 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 + cp qFlipper-cli $out/bin 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; {