jellyfin-tui: fix versionCheck on darwin

jellyfin-tui >= v1.2.1 checks data_dir() at startup.
On Darwin, data_dir() = ~/Library/Application Support, so we must ensure
it exists in preInstallCheck.

Refs:
- https://github.com/dhonus/jellyfin-tui/blob/refs/tags/v1.2.1/src/main.rs#L179-185
- https://docs.rs/dirs/latest/dirs/fn.data_dir.html
This commit is contained in:
Moraxyc
2025-07-03 16:43:32 +08:00
parent c5bdeccf55
commit f4e4292ef6
+4 -1
View File
@@ -1,5 +1,6 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
pkg-config,
@@ -37,7 +38,9 @@ rustPlatform.buildRustPackage rec {
versionCheckProgramArg = "--version";
versionCheckKeepEnvironment = [ "HOME" ];
preInstallCheck = ''
mkdir -p $HOME/.local/share
mkdir -p "$HOME/${
if stdenv.buildPlatform.isDarwin then "Library/Application Support" else ".local/share"
}"
'';
doInstallCheck = true;