Files
nixpkgs/pkgs/by-name/sd/sdl12-compat/setup-hook.sh
Ross Smyth 623c4ea4fd SDL_compat: rename to the real name, no capitals, no underscores
1. SDL_compat is not the library's name, it is sdl12-compat
2. Underscores are not allows in nixpkgs package names
3. Capitals are not allowed in nixpkgs package names
2026-05-19 13:19:05 -04:00

17 lines
615 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
addSDLPath () {
if [ -e "$1/include/SDL" ]; then
export SDL_PATH="${SDL_PATH-}${SDL_PATH:+ }$1/include/SDL"
# NB this doesn’t work with split dev packages because different packages
# will contain "include/SDL/" and "lib/" directories.
#
# However the SDL_LIB_PATH is consumed by SDL itself and serves to locate
# libraries like SDL_mixer, SDL_image, etc which are not split-package
# so the check above will only trigger on them.
if [ -e "$1/lib" ]; then
export SDL_LIB_PATH="${SDL_LIB_PATH-}${SDL_LIB_PATH:+ }-L$1/lib"
fi
fi
}
addEnvHooks "$hostOffset" addSDLPath