28 lines
713 B
Nix
28 lines
713 B
Nix
{ stdenvNoCC
|
|
, lib
|
|
, fetchzip
|
|
, buildFHSUserEnv }: let
|
|
name = "BLHeliSuite32";
|
|
pname = "blhelisuite32";
|
|
version = "32.10";
|
|
|
|
dist = fetchzip {
|
|
name = "${pname}-dist";
|
|
url = "https://github.com/bitdump/BLHeli/releases/download/Rev${version}/${name}xLinux64_1044.zip";
|
|
hash = "sha256-7BuB/Mn5W8oOKePindxiOwPqCo2M67JEBHzD/CiQWAc=";
|
|
|
|
postFetch = ''
|
|
# BLHeliSuite32 tries to write next to its binary
|
|
ln -s /tmp/${pname}_settings $out/Settings
|
|
'';
|
|
};
|
|
in buildFHSUserEnv {
|
|
inherit pname;
|
|
targetPkgs = pkgs: (with pkgs; [
|
|
glib libGL curl
|
|
libgcc gtk3
|
|
zlib systemdLibs
|
|
]);
|
|
|
|
runScript = "sh -c 'mkdir -p /tmp/blhelisuite32_settings && exec ${dist}/${name}xl'";
|
|
}
|