2021-03-15 23:50:58 +01: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 15:40:52 +01:00
|
|
|
runHook preInstall
|
|
|
|
|
2021-03-15 23:50:58 +01:00
|
|
|
cd $src/$sourceDir
|
|
|
|
d=$out${addonDir}/${namespace}
|
|
|
|
mkdir -p $d
|
|
|
|
sauce="."
|
|
|
|
[ -d ${namespace} ] && sauce=${namespace}
|
|
|
|
cp -R "$sauce/"* $d
|
2021-03-20 15:40:52 +01:00
|
|
|
|
|
|
|
runHook postInstall
|
2021-03-15 23:50:58 +01:00
|
|
|
'';
|
|
|
|
} // attrs))
|