mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
20 lines
390 B
Bash
20 lines
390 B
Bash
thisroot () {
|
|
# Workaround thisroot.sh dependency on man
|
|
if [ -z "${MANPATH-}" ]; then
|
|
MANPATH=:
|
|
fi
|
|
local oldOpts="-u"
|
|
shopt -qo nounset || oldOpts="+u"
|
|
set +u
|
|
source @out@/bin/thisroot.sh
|
|
set "$oldOpts"
|
|
}
|
|
|
|
postHooks+=(thisroot)
|
|
|
|
addRootInludePath() {
|
|
addToSearchPath ROOT_INCLUDE_PATH $1/include
|
|
}
|
|
|
|
addEnvHooks "$targetOffset" addRootInludePath
|