fluffychat: 1.22.1 -> 1.23.0 (#364091)
[NixPkgs.git] / pkgs / by-name / in / inav-configurator / package.nix
blob6862b909b044aa0429e4efebb4678a735a36fe3e
1 { lib, stdenv, fetchurl, makeDesktopItem, copyDesktopItems, nwjs, wrapGAppsHook3, gsettings-desktop-schemas, gtk3 }:
3 stdenv.mkDerivation rec {
4   pname = "inav-configurator";
5   version = "5.1.0";
7   src = fetchurl {
8     url = "https://github.com/iNavFlight/inav-configurator/releases/download/${version}/INAV-Configurator_linux64_${version}.tar.gz";
9     sha256 = "sha256-ZvZxQICa5fnJBTx0aW/hqQCuhQW9MkcVa2sOjPYaPXM=";
10   };
12   icon = fetchurl {
13     url = "https://raw.githubusercontent.com/iNavFlight/inav-configurator/bf3fc89e6df51ecb83a386cd000eebf16859879e/images/inav_icon_128.png";
14     sha256 = "1i844dzzc5s5cr4vfpi6k2kdn8jiqq2n6c0fjqvsp4wdidwjahzw";
15   };
17   nativeBuildInputs = [ copyDesktopItems wrapGAppsHook3 ];
19   buildInputs = [ gsettings-desktop-schemas gtk3 ];
21   installPhase = ''
22     runHook preInstall
24     mkdir -p $out/bin \
25              $out/opt/${pname}
27     cp -r inav-configurator $out/opt/inav-configurator/
28     install -m 444 -D $icon $out/share/icons/hicolor/128x128/apps/${pname}.png
30     chmod +x $out/opt/inav-configurator/inav-configurator
31     makeWrapper ${nwjs}/bin/nw $out/bin/${pname} --add-flags $out/opt/inav-configurator/inav-configurator
33     runHook postInstall
34   '';
36   desktopItems = [
37     (makeDesktopItem {
38       name = pname;
39       exec = pname;
40       icon = pname;
41       comment = "iNavFlight configuration tool";
42       desktopName = "iNav Configurator";
43       genericName = "Flight controller configuration tool";
44     })
45   ];
47   meta = with lib; {
48     description = "INav flight control system configuration tool";
49     mainProgram = "inav-configurator";
50     longDescription = ''
51       A crossplatform configuration tool for the iNav flight control system.
52       Various types of aircraft are supported by the tool and by iNav, e.g.
53       quadcopters, hexacopters, octocopters and fixed-wing aircraft.
54     '';
55     homepage = "https://github.com/iNavFlight/inav/wiki";
56     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
57     license = licenses.gpl3Only;
58     maintainers = with maintainers; [ tilcreator wucke13 ];
59     platforms = platforms.linux;
60   };