From 4fdf68a1bcb510824d66f35ecc7672a6452a44b2 Mon Sep 17 00:00:00 2001 From: nicoo Date: Mon, 4 Dec 2023 00:47:48 +0000 Subject: [PATCH] main.lua: Support overriding `ziggy_path` via environment variable This is useful when running on a platform builds of `ziggy` aren't provided for ... or when using a distro-provided build. The idea for this patch originated in NixOS/nixpkgs#270962, as I needed a way to point `uosc` at the nix-managed build of `ziggy`. --- src/uosc/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uosc/main.lua b/src/uosc/main.lua index 2f4eff65..00df9146 100644 --- a/src/uosc/main.lua +++ b/src/uosc/main.lua @@ -396,7 +396,7 @@ require('lib/menus') -- Determine path to ziggy do local bin = 'ziggy-' .. (state.platform == 'windows' and 'windows.exe' or state.platform) - config.ziggy_path = join_path(mp.get_script_directory(), join_path('bin', bin)) + config.ziggy_path = os.getenv('MPV_UOSC_ZIGGY') or join_path(mp.get_script_directory(), join_path('bin', bin)) end --[[ STATE UPDATERS ]]