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 = [ ]; extraRuntimeDependencies = [ ];
installPhase = '' installPhase = ''
runHook preInstall
cd $src/$sourceDir cd $src/$sourceDir
d=$out${addonDir}/${namespace} d=$out${addonDir}/${namespace}
mkdir -p $d mkdir -p $d
sauce="." sauce="."
[ -d ${namespace} ] && sauce=${namespace} [ -d ${namespace} ] && sauce=${namespace}
cp -R "$sauce/"* $d cp -R "$sauce/"* $d
runHook postInstall
''; '';
} // attrs)) } // attrs))

View File

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