mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 21:23:06 +00:00
26 lines
488 B
Nix
26 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))
|