fix: link BLHeliSuite32 music directory

This commit is contained in:
514fpv 2024-01-12 18:05:03 +08:00
parent 049b93b575
commit eab49656ee
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw

View file

@ -4,16 +4,18 @@
, buildFHSUserEnv }: let
name = "BLHeliSuite32";
pname = "blhelisuite32";
workdir = "/tmp/${pname}";
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=";
hash = "sha256-lempCne+Sf/38WHfJHRdL6MspSpi+UhpZNFcsPgI0jw=";
postFetch = ''
# BLHeliSuite32 tries to write next to its binary
ln -s /tmp/${pname}_settings $out/Settings
ln -s ${workdir}/settings $out/Settings
ln -s ${workdir}/music $out/Music
'';
};
in buildFHSUserEnv {
@ -24,5 +26,8 @@ in buildFHSUserEnv {
zlib systemdLibs
]);
runScript = "sh -c 'mkdir -p /tmp/blhelisuite32_settings && exec ${dist}/${name}xl'";
runScript = "sh -c '" +
"mkdir -p ${workdir}/settings && " +
"mkdir -p ${workdir}/music && " +
"exec ${dist}/${name}xl'";
}