forked from mirrors/nixpkgs
a88c3bbfe1
I see no reason why we shouldn't just copy from `.` rather than `$src`. One benefit of this is that the various patch phases update the context of `.` rather than the immutable `$src`, which means they actually have an effect on the build derivation now.
26 lines
485 B
Nix
26 lines
485 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 ./$sourceDir
|
|
d=$out${addonDir}/${namespace}
|
|
mkdir -p $d
|
|
sauce="."
|
|
[ -d ${namespace} ] && sauce=${namespace}
|
|
cp -R "$sauce/"* $d
|
|
|
|
runHook postInstall
|
|
'';
|
|
} // attrs))
|