summary refs log tree commit diff
path: root/pkgs/development/libraries/gettext/gettext-setup-hook.sh
blob: 69020146f84da14d606404a35b66906146699853 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
gettextDataDirsHook() {
    # See pkgs/build-support/setup-hooks/role.bash
    getHostRoleEnvHook
    if [ -d "$1/share/gettext" ]; then
        addToSearchPath "GETTEXTDATADIRS${role_post}" "$1/share/gettext"
    fi
}

addEnvHooks "$hostOffset" gettextDataDirsHook

# libintl must be listed in load flags on non-Glibc
# it doesn't hurt to have it in Glibc either though
if [ -n "@gettextNeedsLdflags@" -a -z "${dontAddExtraLibs-}" ]; then
    # See pkgs/build-support/setup-hooks/role.bash
    getHostRole
    export NIX_${role_pre}LDFLAGS+=" -lintl"
fi