mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
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))
|