nixpkgs/pkgs/applications/video/kodi/build-kodi-addon.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
485 B
Nix
Raw Normal View History

{ stdenv, toKodiAddon, addonDir }:
{ name ? "${attrs.pname}-${attrs.version}"
, namespace
, sourceDir ? ""
, ... } @ attrs:
toKodiAddon (stdenv.mkDerivation ({
name = "kodi-" + name;
dontStrip = true;
extraRuntimeDependencies = [ ];
installPhase = ''
runHook preInstall
cd ./$sourceDir
d=$out${addonDir}/${namespace}
mkdir -p $d
sauce="."
[ -d ${namespace} ] && sauce=${namespace}
cp -R "$sauce/"* $d
runHook postInstall
'';
} // attrs))