depot/third_party/nixpkgs/pkgs/applications/video/kodi/build-kodi-addon.nix
Default email d0d8e8fc71 Project import generated by Copybara.
GitOrigin-RevId: d3f7e969b9860fb80750147aeb56dab1c730e756
2021-03-23 19:22:30 +00:00

25 lines
488 B
Nix

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