2021-03-15 22:50:58 +00:00
|
|
|
{ stdenv, toKodiAddon, addonDir }:
|
|
|
|
{ name ? "${attrs.pname}-${attrs.version}"
|
|
|
|
, namespace
|
|
|
|
, sourceDir ? ""
|
|
|
|
, ... } @ attrs:
|
|
|
|
toKodiAddon (stdenv.mkDerivation ({
|
|
|
|
name = "kodi-" + name;
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
extraRuntimeDependencies = [ ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-03-20 14:40:52 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2022-01-02 09:25:18 +00:00
|
|
|
cd ./$sourceDir
|
2021-03-15 22:50:58 +00:00
|
|
|
d=$out${addonDir}/${namespace}
|
|
|
|
mkdir -p $d
|
|
|
|
sauce="."
|
|
|
|
[ -d ${namespace} ] && sauce=${namespace}
|
|
|
|
cp -R "$sauce/"* $d
|
2021-03-20 14:40:52 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2021-03-15 22:50:58 +00:00
|
|
|
'';
|
|
|
|
} // attrs))
|