101 lines
2 KiB
Nix
101 lines
2 KiB
Nix
{
|
|
lib,
|
|
fetchzip,
|
|
makeDesktopItem,
|
|
imagemagick,
|
|
buildFHSEnv,
|
|
}:
|
|
let
|
|
name = "ExpressLRS-Configurator";
|
|
pname = "expresslrs-configurator";
|
|
version = "1.7.2";
|
|
|
|
dist = fetchzip {
|
|
name = "${pname}-dist";
|
|
url = "https://github.com/ExpressLRS/ExpressLRS-Configurator/releases/download/v${version}/${pname}-${version}.zip";
|
|
stripRoot = false;
|
|
hash = "sha256-pXmJ420HeJaMjAZCzlIriuFrTK5xabxTrSy3PDVisgU=";
|
|
};
|
|
|
|
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
|
|
buildFHSEnv {
|
|
inherit pname version;
|
|
# 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";
|
|
}
|