kodi.packages.buildKodiAddon, kodi.packages.buildKodiBinaryAddon: include runHook preInstall and postInstall

This commit is contained in:
Aaron Andersen 2021-03-20 10:40:52 -04:00
parent 74ade33ccc
commit 6fe6c35a96
2 changed files with 8 additions and 0 deletions

View File

@ -11,11 +11,15 @@ toKodiAddon (stdenv.mkDerivation ({
extraRuntimeDependencies = [ ];
installPhase = ''
runHook preInstall
cd $src/$sourceDir
d=$out${addonDir}/${namespace}
mkdir -p $d
sauce="."
[ -d ${namespace} ] && sauce=${namespace}
cp -R "$sauce/"* $d
runHook postInstall
'';
} // attrs))

View File

@ -24,8 +24,12 @@ toKodiAddon (stdenv.mkDerivation ({
# and the non-wrapped kodi lib/... folder before even trying to dlopen
# them. Symlinking .so, as setting LD_LIBRARY_PATH is of no use
installPhase = let n = namespace; in ''
runHook preInstall
make install
ln -s $out/lib/addons/${n}/${n}.so.${version} $out${addonDir}/${n}/${n}.so.${version}
${extraInstallPhase}
runHook postInstall
'';
} // attrs))