extra-cmake-modules: propagate MIME type providers

This commit is contained in:
Thomas Tuegel 2015-10-18 11:57:34 -05:00
parent 2b52937afb
commit e2383b1f08
2 changed files with 29 additions and 0 deletions

View file

@ -4,6 +4,8 @@ kdeFramework {
name = "extra-cmake-modules";
patches = [ ./0001-extra-cmake-modules-paths.patch ];
setupHook = ./setup-hook.sh;
# It is OK to propagate these inputs as long as
# extra-cmake-modules is never a propagated input
# of some other derivation.

View file

@ -0,0 +1,27 @@
addMimePkg() {
local propagated
if [[ -d "$1/share/mime" ]]; then
propagated=
for pkg in $propagatedBuildInputs; do
if [[ "z$pkg" == "z$1" ]]; then
propagated=1
fi
done
if [[ -z $propagated ]]; then
propagatedBuildInputs="$propagatedBuildInputs $1"
fi
propagated=
for pkg in $propagatedUserEnvPkgs; do
if [[ "z$pkg" == "z$1" ]]; then
propagated=1
fi
done
if [[ -z $propagated ]]; then
propagatedUserEnvPkgs="$propagatedUserEnvPkgs $1"
fi
fi
}
envHooks+=(addMimePkg)