2024-01-12 17:50:48 +08:00
|
|
|
{ stdenvNoCC
|
|
|
|
, lib
|
|
|
|
, fetchzip
|
|
|
|
, buildFHSUserEnv }: let
|
|
|
|
name = "BLHeliSuite32";
|
|
|
|
pname = "blhelisuite32";
|
2024-01-12 18:05:03 +08:00
|
|
|
workdir = "/tmp/${pname}";
|
2024-01-12 17:50:48 +08:00
|
|
|
version = "32.10";
|
|
|
|
|
|
|
|
dist = fetchzip {
|
|
|
|
name = "${pname}-dist";
|
|
|
|
url = "https://github.com/bitdump/BLHeli/releases/download/Rev${version}/${name}xLinux64_1044.zip";
|
2024-01-12 18:05:03 +08:00
|
|
|
hash = "sha256-lempCne+Sf/38WHfJHRdL6MspSpi+UhpZNFcsPgI0jw=";
|
2024-01-12 17:50:48 +08:00
|
|
|
|
|
|
|
postFetch = ''
|
|
|
|
# BLHeliSuite32 tries to write next to its binary
|
2024-01-12 18:05:03 +08:00
|
|
|
ln -s ${workdir}/settings $out/Settings
|
|
|
|
ln -s ${workdir}/music $out/Music
|
2024-01-12 17:50:48 +08:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
in buildFHSUserEnv {
|
|
|
|
inherit pname;
|
|
|
|
targetPkgs = pkgs: (with pkgs; [
|
|
|
|
glib libGL curl
|
|
|
|
libgcc gtk3
|
|
|
|
zlib systemdLibs
|
|
|
|
]);
|
|
|
|
|
2024-01-12 18:05:03 +08:00
|
|
|
runScript = "sh -c '" +
|
|
|
|
"mkdir -p ${workdir}/settings && " +
|
|
|
|
"mkdir -p ${workdir}/music && " +
|
|
|
|
"exec ${dist}/${name}xl'";
|
2024-01-12 17:50:48 +08:00
|
|
|
}
|