about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/interpreters/guile/setup-hook-2.2.sh
blob: 932a5b6c41e64d9ec3121211da09b7c7659abb56 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
addGuileLibPath () {
    if test -d "$1/share/guile/site/2.2"; then
        addToSearchPath GUILE_LOAD_PATH "$1/share/guile/site/2.2"
        addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/share/guile/site/2.2"
    elif test -d "$1/share/guile/site"; then
        addToSearchPath GUILE_LOAD_PATH "$1/share/guile/site"
        addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/share/guile/site"
    fi

    if test -d "$1/lib/guile/2.2/ccache"; then
        addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/lib/guile/2.2/ccache"
    fi

    if test -d "$1/lib/guile/2.2/site-ccache"; then
        addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/lib/guile/2.2/site-ccache"
    fi
}

addEnvHooks "$hostOffset" addGuileLibPath