2016-07-30 22:07:06 +00:00
|
|
|
{ stdenv, lib, lndir }:
|
2016-07-30 21:16:36 +00:00
|
|
|
|
2016-07-30 22:07:06 +00:00
|
|
|
drv: pkgs:
|
2016-07-30 21:16:36 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2016-07-30 22:07:06 +00:00
|
|
|
name = "kde-env-${drv.name}";
|
2016-07-30 21:16:36 +00:00
|
|
|
nativeBuildInputs = [ lndir ];
|
2016-07-30 22:07:06 +00:00
|
|
|
propagatedUserEnvPkgs = builtins.map lib.getBin ([drv] ++ pkgs);
|
2016-07-30 21:16:36 +00:00
|
|
|
unpackPhase = "true";
|
|
|
|
configurePhase = "runHook preConfigure; runHook postConfigure";
|
|
|
|
buildPhase = "true";
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
propagated=""
|
|
|
|
for i in $propagatedUserEnvPkgs; do
|
|
|
|
findInputs $i propagated propagated-user-env-packages
|
|
|
|
done
|
|
|
|
|
|
|
|
for tgt in bin etc/xdg lib/libexec lib/qt5 share; do
|
|
|
|
mkdir -p "$out/$tgt"
|
|
|
|
for p in $propagated; do
|
|
|
|
if [ -d "$p/$tgt" ]; then
|
|
|
|
lndir -silent "$p/$tgt" "$out/$tgt" >/dev/null 2>&1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
}
|