Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inav-configurator6: init at 6.1.0 #320055

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions pkgs/applications/science/robotics/inav-configurator/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{ lib, stdenv, fetchurl, makeDesktopItem, copyDesktopItems, nwjs, wrapGAppsHook3, gsettings-desktop-schemas, version, hash, packed ? false }:

let
shortVersion = lib.versions.major version;
bin_name = "inav-configurator";
in
stdenv.mkDerivation rec {
pname = "${bin_name}-" + shortVersion;
inherit version;

src = fetchurl {
url = "https://github.com/iNavFlight/inav-configurator/releases/download/${version}/INAV-Configurator_linux64_${version}.tar.gz";
inherit hash;
};

postUnpack = ''
find -name "lib*.so" -delete
find -name "lib*.so.*" -delete
'';

nativeBuildInputs = [ copyDesktopItems wrapGAppsHook3 ];

buildInputs = [ gsettings-desktop-schemas ];

installPhase = let
icon = fetchurl {
url = "https://raw.githubusercontent.com/iNavFlight/inav-configurator/bf3fc89e6df51ecb83a386cd000eebf16859879e/images/inav_icon_128.png";
hash = "sha256-/EMleYuNk6s3lg4wYwXGUSLbppgmXrdJZkUX9n8jBMU=";
};
in ''
runHook preInstall

mkdir -p $out/bin \
$out/opt/${pname}

cp -r * $out/opt/${pname}/
install -m 444 -D ${icon} $out/share/icons/hicolor/128x128/apps/${pname}.png

chmod +x $out/opt/${pname}/inav-configurator
makeWrapper ${nwjs}/bin/nw $out/bin/${pname} \
--add-flags $out/opt/${pname}${if packed then "/${bin_name}" else ""}

runHook postInstall
'';

desktopItems = makeDesktopItem {
name = pname;
exec = pname;
icon = pname;
comment = "INAV configuration tool " + version;
desktopName = "INAV Configurator " + version;
genericName = "Flight controller configuration tool";
};

meta = {
description = "The INAV flight control system configuration tool";
mainProgram = pname;
longDescription = ''
A crossplatform configuration tool for the INAV flight control system.
Various types of aircraft are supported by the tool and by INAV, e.g.
quadcopters, hexacopters, octocopters and fixed-wing aircraft.
'';
homepage = "https://github.com/iNavFlight/inav/wiki";
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ tilcreator wucke13 ilya-epifanov ];
platforms = lib.platforms.linux;
};
}
61 changes: 0 additions & 61 deletions pkgs/by-name/in/inav-configurator/package.nix

This file was deleted.

10 changes: 10 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18299,6 +18299,16 @@ with pkgs;

apmplanner2 = libsForQt5.callPackage ../applications/science/robotics/apmplanner2 { };

inav-configurator = callPackage ../applications/science/robotics/inav-configurator {
version = "5.1.0";
hash = "sha256-ZvZxQICa5fnJBTx0aW/hqQCuhQW9MkcVa2sOjPYaPXM=";
packed = true;
};
inav-configurator6 = callPackage ../applications/science/robotics/inav-configurator {
version = "6.1.0";
hash = "sha256-HIicfkPM824+T+zNWK9l6VDZd9Yt/1fVTQjYqfqoUSs=";
};

### MISC

android-file-transfer = libsForQt5.callPackage ../tools/filesystems/android-file-transfer { };
Expand Down
Loading