From 81429ebd17caed99ce7bd47029c911836ee9c3cd Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Sat, 30 Oct 2021 15:46:46 -0400 Subject: [PATCH] kodi.packages.buildKodiBinaryAddon: add extraCMakeFlags arg, add symlinks for libretro cores --- pkgs/applications/video/kodi/build-kodi-binary-addon.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/kodi/build-kodi-binary-addon.nix b/pkgs/applications/video/kodi/build-kodi-binary-addon.nix index 72d6533f38d9..d1eb38cd0bd4 100644 --- a/pkgs/applications/video/kodi/build-kodi-binary-addon.nix +++ b/pkgs/applications/video/kodi/build-kodi-binary-addon.nix @@ -5,6 +5,7 @@ , extraNativeBuildInputs ? [] , extraBuildInputs ? [] , extraRuntimeDependencies ? [] +, extraCMakeFlags ? [] , extraInstallPhase ? "", ... } @ attrs: toKodiAddon (stdenv.mkDerivation ({ name = "kodi-" + name; @@ -19,7 +20,7 @@ toKodiAddon (stdenv.mkDerivation ({ # disables check ensuring install prefix is that of kodi cmakeFlags = [ "-DOVERRIDE_PATHS=1" - ]; + ] ++ extraCMakeFlags; # kodi checks for addon .so libs existance in the addon folder (share/...) # and the non-wrapped kodi lib/... folder before even trying to dlopen @@ -28,7 +29,10 @@ toKodiAddon (stdenv.mkDerivation ({ runHook preInstall make install - ln -s $out/lib/addons/${n}/${n}.so.${version} $out${addonDir}/${n}/${n}.so.${version} + + [[ -f $out/lib/addons/${n}/${n}.so ]] && ln -s $out/lib/addons/${n}/${n}.so $out${addonDir}/${n}/${n}.so || true + [[ -f $out/lib/addons/${n}/${n}.so.${version} ]] && ln -s $out/lib/addons/${n}/${n}.so.${version} $out${addonDir}/${n}/${n}.so.${version} || true + ${extraInstallPhase} runHook postInstall