about summary refs log tree commit diff
path: root/pkgs/applications/science/misc/root/setup-hook.sh
blob: 7affd21012eb6277d975d73ca1ffe393a0907e4c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)

addRootIncludePath() {
    addToSearchPath ROOT_INCLUDE_PATH $1/include
}

addEnvHooks "$targetOffset" addRootIncludePath