kdeFrameworks, plasma5: fix setup hooks

The setup hooks for many kdeFrameworks and plasma5 packages were erroneously
running before $outputDev was set. This lead to .dev outputs being propagated
into the user environment.
This commit is contained in:
Thomas Tuegel 2017-06-22 17:28:15 -05:00
parent f571ad4595
commit 0030c66103
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59
2 changed files with 38 additions and 20 deletions

View File

@ -43,17 +43,26 @@ let
propagate = out:
let setupHook = { writeScript }:
writeScript "setup-hook.sh" ''
writeScript "setup-hook" ''
if [ "$hookName" != postHook ]; then
postHooks+=("source @dev@/nix-support/setup-hook")
else
# Propagate $${out} output
propagatedUserEnvPkgs+=" @${out}@"
propagatedUserEnvPkgs="$propagatedUserEnvPkgs @${out}@"
if [ -z "$outputDev" ]; then
echo "error: \$outputDev is unset!" >&2
exit 1
fi
# Propagate $dev so that this setup hook is propagated
# But only if there is a separate $dev output
if [ "$outputDev" != out ]; then
if [ -n "$crossConfig" ]; then
propagatedBuildInputs+=" @dev@"
propagatedBuildInputs="$propagatedBuildInputs @dev@"
else
propagatedNativeBuildInputs+=" @dev@"
propagatedNativeBuildInputs="$propagatedNativeBuildInputs @dev@"
fi
fi
fi
'';

View File

@ -41,17 +41,26 @@ let
propagate = out:
let setupHook = { writeScript }:
writeScript "setup-hook.sh" ''
writeScript "setup-hook" ''
if [ "$hookName" != postHook ]; then
postHooks+=("source @dev@/nix-support/setup-hook")
else
# Propagate $${out} output
propagatedUserEnvPkgs+=" @${out}@"
propagatedUserEnvPkgs="$propagatedUserEnvPkgs @${out}@"
if [ -z "$outputDev" ]; then
echo "error: \$outputDev is unset!" >&2
exit 1
fi
# Propagate $dev so that this setup hook is propagated
# But only if there is a separate $dev output
if [ "$outputDev" != out ]; then
if [ -n "$crossConfig" ]; then
propagatedBuildInputs+=" @dev@"
propagatedBuildInputs="$propagatedBuildInputs @dev@"
else
propagatedNativeBuildInputs+=" @dev@"
propagatedNativeBuildInputs="$propagatedNativeBuildInputs @dev@"
fi
fi
fi
'';