Merge pull request #167596 from cab404/qFlipper-101
This commit is contained in:
commit
db0254cfcc
1 changed files with 12 additions and 21 deletions
|
@ -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; {
|
||||
|
|
Loading…
Reference in a new issue