package: migrate gyroflow, expresslrs-configurator and blhelisuite32
This commit is contained in:
parent
eecc4911d3
commit
67c28e74af
10 changed files with 21 additions and 6 deletions
|
@ -15,7 +15,7 @@
|
|||
betaflight-configurator
|
||||
inav-configurator
|
||||
inav-blackbox-tools
|
||||
(pkgs.callPackage ./package/blheli32.nix { })
|
||||
(pkgs.callPackage ./package/expresslrs.nix { })
|
||||
blhelisuite32
|
||||
expresslrs-configurator
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
{ lib
|
||||
, libicns
|
||||
, p7zip
|
||||
, fetchzip
|
||||
, stdenvNoCC
|
||||
, makeDesktopItem
|
||||
, buildFHSUserEnv }: let
|
||||
name = "BLHeliSuite32";
|
||||
pname = "blhelisuite32";
|
||||
workdir = "/tmp/${pname}";
|
||||
version = "32.10";
|
||||
suffix = "1044";
|
||||
|
||||
dist = fetchzip {
|
||||
name = "${pname}-dist";
|
||||
url = "https://github.com/bitdump/BLHeli/releases/download/Rev${version}/${name}xLinux64_${suffix}.zip";
|
||||
hash = "sha256-lempCne+Sf/38WHfJHRdL6MspSpi+UhpZNFcsPgI0jw=";
|
||||
|
||||
postFetch = ''
|
||||
# BLHeliSuite32 tries to write next to its binary
|
||||
ln -s ${workdir}/settings $out/Settings
|
||||
ln -s ${workdir}/music $out/Music
|
||||
'';
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = pname;
|
||||
exec = pname;
|
||||
icon = pname;
|
||||
comment = "This Application may flash and configure BLHeli_32 based ESCs";
|
||||
desktopName = name;
|
||||
genericName = "BLHeli for brushless ESC firmware";
|
||||
};
|
||||
|
||||
icons = stdenvNoCC.mkDerivation {
|
||||
pname = "${pname}-icons";
|
||||
inherit version;
|
||||
src = fetchzip {
|
||||
name = "${pname}-macos";
|
||||
url = "https://github.com/bitdump/BLHeli/releases/download/Rev${version}/${name}xm_MacOS64_${suffix}.zip";
|
||||
hash = "sha256-StRnrVI8p51vNsTMO1LtaZvENbG7XZ1V/mKHe4pO7kU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ libicns p7zip ];
|
||||
|
||||
configurePhase = ''
|
||||
7z x *.dmg
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
icns2png -x ${name}xm_MacOS64_${suffix}/${name}xm.app/Contents/Resources/${name}xm.icns
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out"
|
||||
cp -r ${name}*.png "$out"
|
||||
'';
|
||||
};
|
||||
in buildFHSUserEnv {
|
||||
inherit pname;
|
||||
targetPkgs = pkgs: (with pkgs; [
|
||||
glib libGL curl
|
||||
libgcc gtk3
|
||||
zlib systemdLibs
|
||||
]);
|
||||
extraInstallCommands = let
|
||||
mkIconScale = scale:
|
||||
"install -m 444 -D ${icons}/${name}xm_${scale}x${scale}x32.png $out/share/icons/hicolor/${scale}x${scale}/apps/${pname}.png";
|
||||
in ''
|
||||
${mkIconScale "16"}
|
||||
${mkIconScale "32"}
|
||||
${mkIconScale "64"}
|
||||
${mkIconScale "128"}
|
||||
${mkIconScale "256"}
|
||||
${mkIconScale "512"}
|
||||
${mkIconScale "1024"}
|
||||
cp -r ${desktopItem}/share/applications $out/share/
|
||||
'';
|
||||
|
||||
runScript = "sh -c '" +
|
||||
"mkdir -p ${workdir}/settings && " +
|
||||
"mkdir -p ${workdir}/music && " +
|
||||
"exec ${dist}/${name}xl'";
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
{ lib
|
||||
, fetchzip
|
||||
, makeDesktopItem
|
||||
, imagemagick
|
||||
, buildFHSUserEnv }: let
|
||||
name = "ExpressLRS-Configurator";
|
||||
pname = "expresslrs-configurator";
|
||||
version = "1.6.1";
|
||||
|
||||
dist = fetchzip {
|
||||
name = "${pname}-dist";
|
||||
url = "https://github.com/ExpressLRS/ExpressLRS-Configurator/releases/download/v${version}/${pname}-${version}.zip";
|
||||
stripRoot = false;
|
||||
hash = "sha256-m/e8dsOadjk63cwfnnCBbjXzI/ooWZUGRM5n267JmhQ=";
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = pname;
|
||||
exec = pname;
|
||||
icon = pname;
|
||||
comment = "Cross platform configuration & build tool for the ExpressLRS radio link";
|
||||
desktopName = "ExpressLRS Configurator";
|
||||
genericName = "radio link configuration & build tool";
|
||||
};
|
||||
in buildFHSUserEnv {
|
||||
inherit pname;
|
||||
# copied from chromium deps
|
||||
targetPkgs = pkgs: (with pkgs; [
|
||||
glib fontconfig freetype pango cairo xorg.libX11 xorg.libXi atk nss nspr
|
||||
xorg.libXcursor xorg.libXext xorg.libXfixes xorg.libXrender
|
||||
xorg.libXScrnSaver xorg.libXcomposite xorg.libxcb
|
||||
alsa-lib xorg.libXdamage xorg.libXtst xorg.libXrandr xorg.libxshmfence expat cups
|
||||
dbus gdk-pixbuf gcc-unwrapped.lib
|
||||
systemd
|
||||
libexif pciutils
|
||||
liberation_ttf curl util-linux wget
|
||||
flac harfbuzz icu libpng libopus snappy speechd
|
||||
bzip2 libcap at-spi2-atk at-spi2-core
|
||||
libkrb5 libdrm libglvnd mesa coreutils
|
||||
libxkbcommon pipewire wayland
|
||||
libva gtk3 gtk4
|
||||
]);
|
||||
extraInstallCommands = ''
|
||||
mkdir -p $out/share
|
||||
${imagemagick}/bin/convert ${dist}/resources/assets/icon.png -resize 128x128 icon-128.png
|
||||
install -m 444 -D icon-128.png $out/share/icons/hicolor/128x128/apps/${pname}.png
|
||||
cp -r ${desktopItem}/share/applications $out/share/
|
||||
'';
|
||||
|
||||
runScript = "${dist}/expresslrs-configurator";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue