1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 15:41:40 +00:00
nixpkgs/pkgs/applications/video/kodi/build-kodi-addon.nix

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))