3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/desktops/kde-5/frameworks-5.19/kservice/setup-hook.sh
2016-03-01 10:36:00 -06:00

44 lines
1.1 KiB
Bash

addServicePkg() {
local propagated
for dir in "share/kservices5" "share/kservicetypes5"; do
if [[ -d "$1/$dir" ]]; then
propagated=
for pkg in $propagatedBuildInputs; do
if [[ "z$pkg" == "z$1" ]]; then
propagated=1
break
fi
done
if [[ -z $propagated ]]; then
propagatedBuildInputs="$propagatedBuildInputs $1"
fi
propagated=
for pkg in $propagatedUserEnvPkgs; do
if [[ "z$pkg" == "z$1" ]]; then
propagated=1
break
fi
done
if [[ -z $propagated ]]; then
propagatedUserEnvPkgs="$propagatedUserEnvPkgs $1"
fi
break
fi
done
}
envHooks+=(addServicePkg)
local propagated
for pkg in $propagatedBuildInputs; do
if [[ "z$pkg" == "z@out@" ]]; then
propagated=1
break
fi
done
if [[ -z $propagated ]]; then
propagatedBuildInputs="$propagatedBuildInputs @out@"
fi